That innovation led to the next innovation, which was to incorporate enforcement into the role of "male elder".
The initial incident was random, just some pissed off elder male seeing a vulnerable young male and killing him for the pleasure of killing him. But groups that had young males refraining from masturbating out of fear would gain additional competitive advantage by developing a "way of life" that enforced such abstinence.