In some cases “the law is an ass” - Dickens, I think.
There are times when a particular application of a law violates common sense.
Protecting minors from the sexual advances of adults doesn’t violate common sense. This boy has plenty of girls to screw who are roughly his own age. If you think that consent ages for adult sex are too high then work to change them. But the laws are there to dissuade grooming and copulating with minors, irrespective of whether someone wants to high-five the minor. I mean, dude, are American boys undersexed within their own age groups?
The phrase comes from Charles Dickens’ novel Oliver Twist