The thing is that detecting test situations is good, certainly useful, perhaps necessary.
E.g. detecting you are on a test stand, you might
* deactivate plausibility checks which would normally limit engine power * deactivate air bags and other inherently dangerous systems * ensure correct system behaviour even if sensors give conflicting information * suppress error logs for certain failed plausibility checks
The only illegal thing is switching to a "massaged" parameter map under these conditions. And presumably a single person controlled this switch.