Back when I lived in CT I had an F150 that failed since it was new — and Ford couldn’t fix it. After Ford fought with the state a while they granted a waiver for the sniff test. That’s when I figured out it was about money not smog.
Were you around in CT, when emissions was handled by indi companies.....then the state took over and built mandatory emission stations .....that was a fiasco and now it back to indi testing.

“Thats when I figured out it was about money not smog.”
That’s way it’s always been in MD. If you failed but could prove you’d spent $400 on attempts to fix it, you got a waiver. They test every two years. My 1999 SUV is due in June.
Years ago I had an ‘82 Chevy that passed even though most of the smog controls were disconnected. It’s a scam.