There are many different ECUs within a car (about 40 in a current Volkswagen Golf). Does EFF really thinks that someone would have found that issue, when everything is OpenSource?
Nobody would have examined such things, because nobody would have been interested in examining it, if it would be OpenSource. We have seen such things in lots of OpenSource software, just reminding of the now legendary Debian bug in the random number generator or Heartbleed and such things. How long where those bugs present?
To find this wrongdoing by VW you don't need access to the car. Put a measuring device to the pipe and drive around.
The question: why did the engineers implemented a detection of the test environment? Because you need to. You just have to apply a little bit of thinking your self. Such a car is equipped with lots of assistants like traction control, like crash detection, and so on. In a test environment you have your car running on a dynamometer or alike. That means the car detects, that 2 wheels run at 30 mph while 2 wheels are standing still and there is no acceleration. The car now has to classify that situation. The car has to decide if the front wheels are just spinning in the mud and traction control must be applied, or is it a valid situation. So there are lots of those things you have to consider during development and which are valid use cases. Of course this should not be misused.