Consent has nothing to do with signing, look at TOS. Same things with laws - you're subject to them just because you're in their domain.

If you agree to the law, then saying the people tasked with enforcing the law can affect you because you agreed to it is an argument that has some merit.

If you didn't agree to the law, then the people tasked with enforcing the law can affect you for a different reason: because they can. The natural state of things is basically that people can just hurt each other because they want to, and who's going to stop them? And "anyone" includes the police, and "any reason" includes "because their boss told them to enforce the law on you regardless of some-platonic-version-of-you is some-platonic-version-of-bound by the some-platonic-version-of-law"