Two reasons why hierarchical structures show up:
1. If you want to even have someone looking at the "big picture", due to limits of human cognition, you have to build a hierarchy.
2. Hierarchy shows up as a natural solution to coordination problems. Consider e.g. various forms of the tragedy of commons. The solution to that[0] is that all actors involved agree to be governed by an independent one. This is something that humans end up rediscovering all the time.
Basically, hierarchical governance is what lets humanity build societies larger than couple dozen people.
--
[0] - in larger systems, i.e. beyond few people who know each other personally and can mutually agree not to be assholes to one another; we have a strongly developed social skills to handle such issues in small groups.
(A part of) the world already did some good progress on this front with the gradual switch from absolute monarchies to democracies, and I hope it will eventually be able to continue on the path towards a more just world.