And an inspection of your pockets for compliance is just a quid pro quo of breathing the air within the imaginary lines that constitute the borders of the state.
The state searching you without any suspicion of a violation of the law, "to check for compliance," or for "inspection," is not the same as making an agreement with a property owner that you may lease property from him under a set of terms. He owns the property, and you actually probably signed a real agreement and weren't coerced into it.
In Nevada, they set up checkpoints to stop vehicles to search for registration, driver's licenses, and "other violations of the law" (i.e. whatever contraband they see in your car when they have it stopped.). Personally I'm not a fan.
In California they stop people who UOC to search their gun for ammunition. Did they agree to comply in return for the quid pro quo of firearm possession? I've UOC'ed in California, but I never signed an agreement saying they can do that. And who says you can't store stuff in a gun? Maybe I have secret letters and money in the magazine well.
One might argue that presence within the boundary of place is an agreement to be subject the police powers within it, but it certainly isn't as easy to pack up and find a place without police powers as it is to live without a land lord.
Further, the landlord is likely to evict you if he finds something he doesn't like. If the state finds something they don't like, they're going to arrest you, send you to prison maybe, and likely change your status from a citizen to a subject possibly stripping you of your rights after adjudication. A lot more is at stake when you are searched by the state.