For instance, it has always been possible for sufficiently motivated kids to acquire hard liquor. If nothing else they can steal it from their parents. To stop this you would need surveillance inside every home and extremely harsh punishments. But we don't actually need that, because an imperfect prohibition works reasonably well.
The whole premise that if a law isn't perfectly enforceable then it's a bad law is a weird thing that techies on the libertarian/autism spectrum come up with a lot, but it's not the way the world actually works.