Humanity went through a long period of what is known as multilevel selection in which groups competed with groups, while at the same time individuals competed with individuals within each group. The most cohesive groups won, and humans evolved—by both biological and cultural evolution—an adaptation that made their groups even more cohesive: religiosity (including both the fear and the love of gods).

