All this stuff mediates revenge, or vengeance, and keeps everything from becoming the Wild West [or A) state of nature if that means instinctive competitiveness, B) rejecting the state of nature if that means instinctive cooperation, aka C) failing to mediate A and B … instinctive competition and instinctive cooperation … with self = other] globally.
just war (the institution of foreign policy)
justice system (institution of domestic policy)
just sexual relationships (institution of marriage)
Note that if you don’t reject the state of nature concerning cooperation, you will not self-destruct. But you may die out due to foreign forces that do not participate in your cooperation, but compete with it. The instinct of competition (over vital resources initially) is the survival instinct. You could also call this the reproductive instinct, which is also the source of the instinct of cooperation. So the source of both cooperation and competition instincts is the survival (life wish) or reproduction instinct.
Where did that come from before it was fully functional, if everything dies if it’s dysfunctional or malfunctioning?