When someone first explained the montana loophole, I couldn't believe it was legal, and the consensus at the time was that no, it wasn't actually legal. If you got into an accident, you'd have some difficult explaining to do to your insurance. What the state did here was make it more obvious that people shouldn't be doing this.
The real loophole for normal people is that CA outsources smog checks, there are facebook groups advertising that they will pass your car -- the one without catalytic converters, for example. California is this interesting blend of lawlessness and rule-following, high taxes but also tons of absurdly low taxes (think Prop 13).