People in the same tribe treat each other more compassionately and outsiders more coldly; hence ethical disregard by corporations, and the inherent immorality in coteries which feel besieged, such as the police.
The pressure of competing for a common resource can produce irrational hostility between groups. ~ Canadian psychologist Artem Kaznatcheev
Group identity is the springboard to brutality. Every army fighting a war commits atrocities. The more righteous the morale, the less moral the behavior of troops. This explains Islamic terrorism.