... the affected models had software in its computer engine controls that could sense exactly when it was being tested for emissions quality
So the regulations specify the emissions limits under defined operating conditions, and the maker designs an engine around the government's specifications. Now the government changes the rules. Typical government.
And OMG, see how much harm has been caused! By the emissions, I mean.
That is not what they did.
They detected emissions testing and reduced nitrous oxide emissions only during testing.
Breath in those particulates for a few years and ask how much harm it is doing.