If the rulebook says "When we plug in our testing machine, your car needs to be emitting X, Y and Z", then they were totally within the rules.
I am familiar with the rules, but they are too long and complex to explain here. It used to be about passing the test, but other companies got caught doing the same thing 20 years ago. Now there are limits on real world emissions as well, called NTE, for heavy trucks. Apparently cars are not subject to the same restrictions.