The much-quoted observation, that “nothing in biology makes sense except in the light of evolution” also applies to living systems of all kinds. These too are products of the evolutionary process. Accordingly, the general answer to the “why” question is that they produced functional synergies, otherwise unattainable combined (cooperative) effects that were advantageous for survival and reproduction in a given environment. It was the “bioceonomic” benefits produced by various synergistic effects that drove the process.
This theory of complexity in evolution – known as the Synergism Hypothesis – was first proposed in a 1983 book with this title and was independently suggested again by John Maynard Smith and Ers Szathmry in 1995. As discussed in this paper, and elsewhere in more detail, a selection process analogous to natural selection, which the late John Maynard Smith called Synergistic Selection, has led to a progressive increase in complexity over time, and this process has been marked by a number of “major transitions” in the level of organization and the “unit” of selection.
This dynamic applies to the evolution of humankind as well. Cumulative synergistic behavioral innovations of various kinds, including especially social cooperation, have been responsible for the multi-stage evolution of humans over several million years from a small-brained, diminutive biped (australopithecines) to large scale, complex modern societies. In a very real sense, the human species invented itself, and functional synergy played a key role.