I mean, humans have always been tribal and that fact has been passed along the generations because it is an evolutionary advantage. Forming groups and sticking with that group is how you survive in the state of nature. If we were not tribal, we would have all died out long ago. And that didn't change just because we entered into society with a social contract. In fact, it may be even more important to get people to follow the rules of the social contract.
The reason the world is in the state it is in is because people are dumb and self-interested. They lack the ability to act with rational self-interest and as a result have turned the world to shirt.