The good, the bad and Narcissus
Anyway, at that time the world was pretty simple: Those, who belonged to the pack, were the good, from the point of view of the pack boss. Those, who did not let themselves be monkeyed or did not belong, for whatever reason, were the bad guys. Because every pack, for some unknown reason, always believes it is the best of all packs. This can sometimes be dangerous for opposing packs. For example, if a pack is dissatisfied, the leader must somehow calm the general grumble and otherwise compensate for his shortcomings.
So it's only logical that he then claims the others are evil. If the pack, and that is naturally many, also believes that the others are evil, then the other are just bad. Logic was very simple in the old days. And if the other pack still does not give in then we have a diplomatic problem.
We learn from this that a bogeyman is a very practical invention, because it troops the Anxious primates around the center of power. Besides, the Narcissist always needs scapegoats to hide his own insufficiency and to mobilize the pack for his needs. And because complex things are simply too high for him, he is easily content with simple explanations.
Rituals of power
So it is completely nonsensical, if today still is claimed, that states only developed in ancient times. No, even the primates already had a rather complex policy. Strictly speaking, it has essentially remained that way until today, because a more complex system is simply unreasonable to the archaic knitted brain of the Narcissist.
The rituals of power have likewise changed little in principle. The big taboo still hides the ugly little power games behind the scenery of civilization. At the center of power is Tohuwabohu, but no matter. Main thing, the facade is maintained. So let's just keep doing it, as if because everything else could endanger the system and we have no better. Which is probably mainly because it consists of humans.