It's relevant, but not quite what's described.
Seems like you're addressing the difference between the concept of Social Contract and the concept of Law.
The Social Contract is exactly what you described: the implicit permissions and offenses that a body of people will tolerate. It is, by definition, equal to the current will of the people, and as you said requires discovery. But it requires constant discovery, as the list of permissions and offenses may change over time, and is not necessarily consistent.
Law is an explicit agreement on what permissions and offenses that body of people will tolerate. Ideally it would match the social contract's list of permissions and offenses, but in reality it will always be lagging behind, and it's a social responsibility to try and keep it up to date. Unlike the Social Contract, the law is codified and constant, requiring no discovery.
In small groups of people, coexisting with just the social contract can be all you need. But as the group grows, it becomes less and less possible to predict what the current body of permissions is, leading to people committing offenses without malicious intent; there was no way for them to know beforehand that an action was an offense. And because the body of permissions changes constantly, it's also not something that can be relied on practically after the discovery. We must always suffer the anxiety of taking an action that will condemn us.
Law provides an easier means to get along by providing a constant and predictable list of permissions and offenses. It changes too, but only by announcement, allowing the populace to stay abreast of the updates. This offers a relief to the anxiety presented in a strictly Social Contract setting, and encourages people to act and be involved in daily life rather than avoidant of it.
The offenses you're describing seem to fall under the concept of De minimis[1], which establishes that there are offenses to a rule that just aren't worth acting on. We all know they're against the law, but not necessarily against the spirit of the law, and the cost of acting on those offenses are greater than the benefits. So we allow them to happen, by virtue of the Social Contract overriding the Law in minor circumstances.
But that doesn't mean that the rules and regulations aren't important and larger offenses should never be acted on. The Law is still the Law and for good reason. Ignore it, and that anxiety returns to plague anyone without the power to force their will.
[1]https://en.wikipedia.org/wiki/De_minimis