How could some engineers cheat the entire VW corporation?
Germans are known for their ridiculously meticulous standards and testing. VW should have many in-house and external-independent labs performing tests.
The engineers who write the ECU code have a great distance from the mechanics who test every engine and car batch from their production line.
How did they never tested and engine entirely; power, emissions, consumption?
You may fool the regulators but you can't fool your own mechanics.