Yes, and perfect law enforcement is much worse than society than spotty law enforcement, because spotty law enforcement is how all societal progress got made.
Imagine if we jailed every gay person the moment they had a gay thought. How legal do you think being gay would be now?