The Need for a Common Enemy
Even monkeys and apes are clever enough to use the threat of a common enemy as a way of reducing within-group tensions. Frans de Waal has seen wild baboons resolve a dispute by jointly threatening the members of another baboon troop, and chimpanzees in a zoo making aggressive â€œwraaaâ€ calls in the direction of the cheetah enclosure, though no cheetah was visible. â€œThe need for a common enemy can be so great that a substitution is fabricated,â€ says de Waal. â€œI have seen long-tailed macaques run to the swimming pool to threaten their own images in the water; a dozen tense monkeys unified against the â€˜otherâ€™ group in the pool.â€
In the absence of a common enemy, or of a common goal that can be achieved only if everyone pulls together, groups tend to fall apart into a collection of individuals or smaller groups.
More science here.