Correction: A single software engineer has been offered up as a scapegoat for VW's emissions cheating. And, unless there's a backroom deal going on where he has agreed to take the fall in exchange for a payout, he will win the fight.
There are plenty of situations where it's perfectly legal to design, or even own, something; but not use it in public. Emissions laws are different in various countries. It's not illegal to write the software for a high-emissions vehicle to be sold in China or India for example. The decision to use that software in the US, however, was most certainly NOT made by this one software engineer who's being blamed for the whole scandal. Even within the US, emissions rules apply only to cars driven on public roads. If you're going to only use your car at the race track; you're perfectly free to pull out the catalytic converter and muffler, and put in a set of straight pipes. And it's perfectly legal to sell the parts to enable someone to do so.