One issue is that imperfect enforcement is often how the momentum to change the law is created.
If the police had been able to swoop in and arrest the "perpetrators" every time two men kissed, homosexuality would have never been legalized; If they had been able to arrest anyone who made alcohol, prohibition wouldn't have ended; if they had been able to arrest anyone with a cannabis seedling, we wouldn't have cannabis legalization.
Quite the opposite. A lot of obviously innocent people ending up in jail will have created a massive backlash a lot earlier, helping fixing idiotic legislation.
This brings up an often overlooked aspect of the role of laws in society, that it it’s important that there exist an ability to break laws. It’s critically important to the growth and flexibility of a society that laws are never perfectly enforced, that there remain ways to evade persecution. It is healthy. Faced with this situation, societies have to think further about what might have been missed in existing law that would cause ongoing skirting of the law and find better ways to structure its mutual responsibilities that we each impose on each other, often unjustly. It would be a terrible thing if the snapshot of laws at any given moment in time was allowed to be perfectly enforced. Laws are not moral documents. Their creation is fraught with unjust power grabs and non-universal moral codes. They are also created knowing that they will not be perfectly enforced and are given exaggerated cruelty when enforced to discourage others. Perfect enforcement would require a full rewrite of all laws.