Hierarchy is present in all social animals, including humans. I mean the ones that live in groups. Hierarchy is meant to decrease intraspecific aggression. To keep two males from fighting over every piece of food or a female, nature came up with ranks.
Source: tatoeba (5880253)