Back when Washington did emissions, I was certified to do repairs. The air cleaner has a lot of effect on air flow and usually a pre-heat system is present. When testing emissions, the air cleaner needed to be installed. Sometimes the CO readings would change 1% or more along with changes in HC.
They did do under hood inspections and checked for required equipment. If anything was missing the vehicle failed regardless of the tail pipe readings. Many vehicles were dumped on the used market with missing parts that were costly and hard to find. We made money from the repairs, but it was a PITA dealing with the state.
I am not a tree hugger but before the emissions testing when we had periods of stagnant air circulation the air quality was bad. The EPA actually asked the state to stop testing because vehicles are much cleaner today. Testing became unnecessary.