War is the extreme manifestation of tribalism, “us” vs. “them”.
As social animals, we as individuals have a tendency to identify with some group. That group can be defined by many factors: genetics, ideology, geography, economic interests, etc. But however it’s defined, we come to see our “tribe” as an extension of ourselves. the limits of our tribe demarcate where “self” ends and “other” begins.
Whenever that tribal self comes under threat from some other tribe, we want to see our tribe come out on top (this is the drive that we ritualize in spectator sports). When we come to think that the threat actually puts the survival of our tribe in danger, we resort to war.