It was. We had sealed beam headlights for a while till we didn’t. There were common rules for aiming and it worked. The lights weren’t all that bright and the styling was not stellar, however.
I remember having to take my car in to adjust the aiming of the headlights after it didn't pass inspection. So we used to take things like this seriously. I just had my car inspected last month, I don't even remember them hitting the horn. I'm guessing they pretty much just shove a sensor up the exhaust pipe and call it a day while accepting your payment.
No shoving sensors required, the data is all in the ECU accessible over OBDII interface. The car knows if it’s compliant in real time using the sensors it already has.
In states in the USA which perform emissions testing, many of them did not mandate it for diesel cars. For example, I owned a VW Jetta TDI and in New York (which has yearly emissions testing where an OBDII computer is mandated to be connected to gasoline powered cars in order to pass the yearly emissions inspection) and I was exempt from the emissions testing entirely.
A 3rd party sensor would be incredibly expensive for inspection stations to purchase as it would need to meter the air and fuel which enter the engine (assuming we aren't going to trust the car's computer which already knows these figures) as well as to measure the emissions out of the tail pipe. This is economically unrealistic to implement without a dramatic price increase in the cost of regular emissions testing.
Trusting the computer is the economical and realistically widely implementable solution. But yes, it has it's blind spots.