Arsehole-ish, but not illegal. All the hidden lockouts on the other hand....
Context and manuals are just so much smoke and fail to obscure the facts.
Nevermind the poorly executed "if day => 21, month => 11, year => 2021", which was conveniently setting a failure which wasn't actually present.
It'a probably not that simple, but it's not that complicated either. If you make something engineered to fail without there being a failure present, that's clear malice.
Imagine buying a car, you own it until the warranty runs out and the the manufacturer's workshop moves (say there was a fire/flood/sinkhole/industrial disaster, and they had to) and the car would refuse to move since it's not being serviced at the official location anymore.
This would force the government to rely exclusively on that manufacturer to then fix these trains and perform all future maintenance.
That is until your scheme is uncovered because you left the GPS coordinates of your competitors workshops in your code.
>5.5 mln USD. U$5.5m? Not saying I'm more correct than anyone else, but the former seems outlandishly long.