What I've typically seen with inspectors is that if it looks cookie cutter and they know the outfit that did the work, they rarely inspect for realsies.
I've seen 2x3 walls holding up a second story. By a known builder, in a very affluent county with a notoriously rigorous enforcement regime.
Another issue: Building codes are also put together by private groups, then adopted into model laws by various jurisdictions. Even though it is not supposed to be possible to copyright law, this practice dodges those restrictions. You end up having to pay quite a bit of money for these codes.