Question: How do humanity and its social structures evolve in history?
All three play a role, but decisive are unintended consequences of intentional actions. Ultimately, the structures in human societies evolve according to the same principles as those in other animal populations: the basic principles of evolution: reproduction, variation, selection. Only with the difference that humans (sometimes) act intentionally, i.e. certain variants are deliberately and consciously introduced into the process. However, whether these variants then are positively or negatively selected depends on factors (so-called "selection parameters" ) that humans cannot control. To put it in one sentence: "History is the result of human actions, but not of human design".