As social psychologist Jonathan Haidt has argued for years, doing things in groups is really hard, and the larger the group, the harder it gets. Moral values like group loyalty — an instinctive group loyalty, not some dry intellectual thing carefully reasoned from first principles and self-interest — make it possible for us to do this very difficult thing. And the reason you can’t simply rely on a more intellectually attractive, well-reasoned version is that other people will not trust it. Your reasoning could change, or your self-interest could dictate that you betray them. Bedrock emotions are stickier. This makes them problematic, but it also makes them necessary.
This by no means suggests that to be patriotic you need to support, say, aggressive foreign wars, or a large military, or any of the other things often associated with patriotism in our political culture. (Note that in the 1930s, the most strongly patriotic folks were often virulently anti-interventionist, at least until Pearl Harbor.) What it does mean is that you should be able to say, without irony or reservation, “I love my country more than any other country,” and understand that adults around the world won’t hear this as an insult against their own land, but as the moral equivalent of “I love my wife more than any other woman.” You don’t love your country best because all the others are rotten places full of awful people; you love it best because it’s yours.
This sits badly with the cosmopolitan values of wide swathes of the country, because this sort of particular love closes off other options. But as I’ve noted before, the idea of being a “citizen of the world” is nonsense. If you get into trouble in a foreign country, it’s the U.S. embassy that’s required to swoop in to bail you out, not “the world.” Don’t get me wrong; there are many fine people abroad, and many of them may help you. But the U.S. government is the only one that has to, and that makes all the difference.