Every feature that distinguishes humans from other primates and other animal species might have emerged in response to an evolutionary crisis.
A story (hypothesis):
In the early millenia, our ancestors could only achieve orgasm by copulating and thus producing offspring, "as Nature intended".
But as millenia passed, humans evolved to become bipedal, and we lost our ability to climb trees.
[See] [Humans left the trees 4.2 million years ago] "Early human ancestors stopped swinging in trees and started walking on the ground sometime between 4.2 million and 3.5 million years ago, according to a new study. "
About 3 million years ago, soon after our ancestors had become bipedal, some of them were in the jungles of Uganda, where banana is an important food source.
[See] [Banana & Plantain] "Banana are grown in nearly 130 countries. Uganda is the largest producer of banana and plantain in sub-Saharan Africa (SSA), followed by Rwanda, Ghana, Nigeria, and Cameroon."
"Cultivated banana plants vary in height... Most are around 5 m (16 ft) tall, ...".
An evolutionary crisis occurred when the arms of our ancestors became long enough to make masturbation possible. During this transition, humans who had longer arms had an evolutionary advantage, as they could reach bananas that others with shorter arms could not reach. As millennia passed, arms became longer. An evolutionary crisis occurred when our ancestors became able to reach their genitals with their hands. Prior to this evolutionary moment, an individual could only achieve orgasm by copulating and thus producing offspring. But now an individual could achieve orgasm without copulating and producing offspring.
Source: Bernard DUPONT from FRANCE, CC BY-SA 2.0, via Wikimedia Commons
The innovation of moral thinking spread quickly because groups that developed it had a competitive advantage. The initial incident established a new kind of thinking within the group that had accidentally discovered it. Within that group, the young males absorbed a new fact. "If you get caught masturbating, you will be beaten and killed." Even though the original incident was random, risk aversion by young males established the rule, and obedience to it, in the group. And as multiple groups either made this innovation independently or by inter-group learning, such groups out competed the groups that did not innovate.
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.
As more millenia passed, such aspects of the "way of life", or roles, of a group became passed from old to young in the form of rules of behavior, what we today call "moral rules".
In this way, the "way of life" that each of our ancestral groups had, developed from simple gender specialization, to gender roles, to more complex roles, and finally to moral rules. Initially, behavior within a group was undifferentiated; groups of males mixed with females formed simply because there is "safety in numbers". Then males and females specialized, both genetically (physiologically) and memetically (behavior). Then this gender specialization became codified as a way of life consisting of gender roles. Then the way of life developed so that it was defined by more complex gender roles dictating behavior according to age, social ranking, etc.. At several successive evolutionary moments within this development, moral thinking, then moral enforcement, and then moral rules emerged.
Finally, these developments both required and encouraged the genetic, physiological innovation of larger brains with greater abstract cognition, in part so that general moral rules could be formulated, communicated verbally, and applied beneficially in the wide variety of factual contexts that life presents.
[See] [Bigger Brains: Complex Brains for a Complex World] "Brain size increases slowly - From 6–2 million years ago - During this time period, early humans began to walk upright and make simple tools. Brain size increased, but only slightly. - Brain and body size increase - From 2 million–800,000 years ago - During this time period early humans spread around the globe, encountering many new environments on different continents. These challenges, along with an increase in body size, led to an increase in brain size. - Brain size increases rapidly - From 800,000–200,000 years ago - Human brain size evolved most rapidly during a time of dramatic climate change. Larger, more complex brains enabled early humans of this time period to interact with each other and with their surroundings in new and different ways. As the environment became more unpredictable, bigger brains helped our ancestors survive."
Although these authors opine that the factor driving brain growth was climate variability, the timing of most rapid brain growth also coincides with the emergence of village life, i.e. gender roles. Whether larger brains caused village life to emerge, or the emergence of village life rewarded brain enlargement, is an open question.
[Q&A: What is human language, when did it evolve and why should we care?] "Combining these genetic hints with the differences in symbolic and cultural behaviour that are evident from the fossil record suggests language arose in our lineage sometime after our split from our common ancestor with Neanderthals, and probably by no later than 150,000 to 200,000 years ago."