For what?
Doing their Job?
They're simply enforcing the code. Same as a Hiway patrolman enforcing the law.
Chances are you broke at least a dozen laws of the road on the way to work today. Whether inadvertently or blatantly. Yet you'll likely only be pulled for the MOST offensive charge IF you get pulled.
Same with passing an inspection. Chances are, you're likely failing to meet code on a dozen or more items during an inspection. The key is; How hard will that inspector look? And if they challenge you, JUST like the trooper....it's a game of "how well do you know the code" as to whether you can beat them at their own game. Only difference being... many times what meets code is up to the discretion of the inspector. Not so with the trooper...the law is the law. But the code is....well...up for interpretation sometimes. And guess who interprets that code