Nationalism is a socially acceptable, and surprisingly encouraged, form of racism.
Why take pride in something you did not have any say in?
If you're blessed by being born in a country with 'freedom,' why is your response to rub it in everyone else's face?
It is so common for Americans to have pride in their countries, and instead of being grateful for where they were born, they twist it into some egotistical competition.
Take Game of Thrones for example. The people of Westeros are taught from a young age that Wildlings are their enemy, that the wall was built to protect them from the savages on the other side. They grow up thinking this is normal, yet have not even laid eyes on these 'Wildlings' they are told to hate. Do the people of Westeros take a moment to try and understand what life is like for the Wildlings? Why they are considered savages, and why they are hated by people south of the wall? I highly doubt it.
Just like nationalists, they are raised on hateful propaganda and they blindly accept it. They lack empathy. There may be times when someone is genuinely trying to hurt you or your people, but you cannot assume this based on their geographical location.
In Game of Thrones, Randyll Tarly, Sam's father, despises the Wildlings. He sent his son to the wall in hopes that killing them would turn him into a man. He most likely has never come into contact with a Wildling, but propaganda has fueled his hate. Sam eventually brings home a Wildling woman, Gilly, in hopes that she can live with his family while he goes off to become a Maester. Randyll assumes she is a whore and reluctantly accepts this.
Then, they have dinner together and she slips up and hints at being from the north. He questions Gilly and she confirms it, to which he responds, with a look of disgust on his face, "You're a Wildling. The Seven Kingdoms have waged war against these savages for centuries and here I sit hosting one in my hall thanks to my son." He continues on about how Sam will never take his place as head of the house, then says, "I took you for a Mole's Town whore when I saw you and I made my peace with that. Who else would have him? But I overestimated him. No. It was a Wildling whore that seduced my son. This you getting back at me, boy? Hmm? Bring that to my table and making me dine with it." So because of where she happens to be born, she is hated, insulted, and referred to as an 'it.' How can one dehumanize someone they know nothing about except for where they are from? Well, simple, they have been brainwashed by nationalist propaganda!
If you watch the show you will know Gilly does not deserve that, she was unfortunate to be born north of the wall where her father raped his daughters and sacrificed his sons in order to survive. The living conditions north of the wall are horrible, but they are subject to them due to nationalist fear. These people are different, they don't understand our way of life, they can't adapt. Yes Game of Thrones is just a show but this is similar to what happens in the real world, and while those who watch the show probably sided and rooted for Gilly, when it comes to the real world they may do the opposite.