it works the same way in construction as well. Before inspection of something like electrical, you go introduce an obvious error that is easy to observe, doesn't take long to fix, and doesn't require additional materials. The inspector can write a report indicating the work is substandard and later gets to write another report indicating the work is corrected and the sign off is complete. Everyone gets to go home happy at that point.
Inspectors aren't wise to this? They see everything done right except for this one obvious flaw? Or they see the glaring flaw immediately and they stop looking at the rest of the work? Imagining myself as an inspector, if I see something simple that is clearly done wrong, I am now going to go over the whole job with a fine-tooth comb.
So this sounds like "urban legend" to me, but maybe there is a grain of truth in it?
If you get the book thrown at you, you will lose without exception.
It's real, and inspectors are wise to it, but I guess the subtle acknowledgement that perfection is impossible goes a long way. A lot of "lower risk" inspections are very old-timey/human. You won't get away with it in an aerospace inspection, but somebody looking over the job site or kitchen is playing by different rules.