It is my understanding that with internal combustion engines there is a trade-off between NOx and CO2. The hotter you burn, the more efficient the engine, but you also create more NOx. Volkswagen chose to tune their engines for fuel consumption, reducing GHGs, but tried to cheat their way around the illegally increased NOx.