The root cause of strife isn't hetereogenity, it's lack of institutions and mechanisms to resolve strife without violence.
I agree with it as a reaction to the idea that strong fences make good neighbors. Good neighbors aren't a static thing. But as an end goal reduction? Seems lacking. A strong set of nations seems to be more benefitted from all nations in the set being strong. Not in any domination.
https://www.amazon.com/Abridged-Version-Project-Perpetual-Pe...
Nationalism is in-group altruism, focused on the members of a particular political unit. It has the disadvantage of excluding outsiders. We all know that this can lead to war and to hatred of outsiders. Noone can say that nationalism has no dark side.
However, the advantage of nationalism is that it is realistic. It has a focused goal: this state should be run for the benefit of the people living in it. The goal is achievable, as can be seen by the existence of modern nation-states with features like democracy, written constitutions, law courts and social welfare.
An alternative to nationalism is internationalism. That sounds better: nobody is excluded! But internationalism, like the Pope, has no battalions. It has few existing, global institutions that can be used to get things done. Some people think we should push for more such institutions, maybe by empowering the UN. Others reasonably reply that a world government might easily become a world tyranny. Others used to believe that international socialism, and the workers of the world, might provide the "battalions". The twentieth century showed that to be a dangerous dead end.
In the absence of those institutions, internationalism tends to devolve into hot air. If you disagree, and think of yourself as an internationalist, ask yourself how much of your money you have spent helping the world as a whole. If it's less than 1%, I accuse you - no offence - of talking hot air. By contrast, I pay large amounts of taxes to my nation's government. I have to (which is a good thing), but even voluntarily, I do things like voting, which helps keep democracy going.
In short, nationalism is the only system of widespread altruism that actually works.
And pacifists (see leon Blum in 1914).
And people who generally don't agree or arn't part of the national imagination, but nevertheless are part of the nation (southern USSR around WW2?).
In general the nationalism of the general population is easy to exploit for people who don't care and have the power to do so.
It's "this state should be run for the benefit of <ethnic group>, and anyone else should be purged". It's about ethnic groups, not citizenship.