Back in the "good" old days that was the whole reason. And it was orignally to stop masterbation.
It's amazing to me that that was ever a decision that an actual person made. Like, "Hey, there's all kinds of horrible things happening in the world...famine...war...rape... You know what? Let's try to prevent the next generation from masturbating. That will make things all better."
Ffs, people need to do more masturbating. If people spent more time masturbating they'd have less time on their hands to fuck up the world, you know? And they'd be waaaaay more relaxed.