We are descended from those groups of our ancestors who innovated by introducing "moral rules"
If a group could prevent its young males and females from masturbating, it would have a competitive advantage by having more offspring and more "warrior" males. Those warrior males would also be more formidable, to the extent that masturbation enervates a male. In this story, an already angry older male came upon a young male masturbating. Seeing that the young male was vulnerable, the older male attacked him, beating and killing him. Another young male witnessed this misfortune, and thought, "it feels good, but I'd better not do it". This was the beginning of a new kind of thinking.