Ok... hang on. Are you familiar with what a 'police state' is?
po·lice state
/pəˈlēs ˈstāt/
noun
a totalitarian state controlled by a political police force that secretly supervises the citizens' activities.
Key words therein are 'totalitarian', 'political', and 'secretly'. Law enforcement officers do not secretly perform radar speed checks (we all know they are out there); similarly, contractors know that inspectors look for code violations.
Building officials and inspectors are granted authority through police doctrine and are governed by the same principles. Principles such as probable cause, plain view doctrine, legal search and seizure, etc. This is why all inspectors should have to take the legal module for the CBO exams.
I do agree that surprise inspections are malicious and will create a toxic working relationship; I however disagree that it creates a police state. If their is probable cause, be friendly and get invited onto the site (not that hard) or get a search warrant (via a judge).