Patriotism does exclude others, because it does mean that you're illogically focusing on a single country instead of the rest of the world - and indeed the rest of the universe.
It's completely illogical to identify with a country, or want one country to do well over another.
My intuition is that it's partially an expression of narcissism. As George Bernard Shaw said: "Patriotism is your conviction that this country is superior to all others because you were born in it."
And, as Aldous Huxley said: "One of the great attractions of patriotism - it fulfills our worst wishes. In the person of our nation we are able, vicariously, to bully and cheat. Bully and cheat, what's more, with a feeling that we are profoundly virtuous."
Goering, during the Nuremberg Trials, also explained how patriotism was easy to exploit to get the people to do the leaders' bidding:
Why, of course, the people don't want war. Naturally, the common people don't want war; neither in Russia nor in England nor in America, nor for that matter in Germany. That is understood. But, after all, it is the leaders of the country who determine the policy and it is always a simple matter to drag the people along, whether it is a democracy or a fascist dictatorship or a Parliament or a Communist dictatorship... voice or no voice, the people can always be brought to the bidding of the leaders. That is easy. All you have to do is tell them they are being attacked and denounce the pacifists for lack of patriotism and exposing the country to danger. It works the same way in any country.