"The path to hell is paved with good intensions" and this applies to Engineers almost more than other people as they are in a position to actually create hell.
1. Creating an parameter map for the engine management system is a good thing. It allows the performance of the engine to be tuned, where all of the possible values are stored in one place where they can easily be changed and also tweeked during production.
2. Allowing several parameter maps which are linked to environmental conditions also makes sense. Vehicle speed, temperature, pressure are all possible inputs, and it wouldn't make much sense to limit this list. The more environmental inputs the better, right?
3. There would also be some testing to see how green the engine could be made to run, and a suitable parameter map produced. Why wouldn't you? It might be great and give you a great competative advantage.
4. You want to sell in different markets that have different environmental requirements. Best leave all of the maps in the software so that it doesnt need to be changed.
5. We need to have the car tested by the USA EPA for emissions before we can sell it there, but there is still some more work on the software that needs to be done.. thats ok. Load the car up with the software so that when it is tested it gets the 'right' map and passes. We don't want to delay the launch of our new model with new diesal engine.
6. Work done.. software complete. Lets not remove the EPA code, its too risky and we might break something else... and by the way, the guy that new that bit of the code has moved onto another project.
I'm not saying that this is what happened, but may be how some small steps led to this situation.