If the millions/billions in costs for not complying is less than the millions/billions they make for not complying, they'll not comply every time.
As the say when you get screwed, Don't take it personally. It's just business.
My belief is this:
In a corporation where there are a gazillion layers of management, the info that starts at bottom, works its way up the gazillion layers with the info repeated to each layer up the piles of management alway put forth in the best light because that's what the next layer wants.
The "coding" was most likely done under contract by someone not even employed by VW.
All the very top management ever "heard" was, "we're compliant, boss".
What failed, is there rarely is a system of Checks and Balances in the corporate environment. Because they net more money in the end without Balances. Even after paying the costs of not having Balances. So why bother paying for it
Everybody gets a fat bonus, pension, and a plaque except each janitor who swept the crap into the trash can that would never be seen by the next layer up.
The corporate structure is corrupt, defective and evil. But it's all we have.
So next, we have the number of government regulations exploding exponentially to deal with the failings of the corporate structure.
Aha, who creates these laws and regulations? Politicians who vote strictly on a ,"Gimme this and I'll givya that" basis financed by lobbyists paid for by corporations.
It's ugly out there...