The caring about their own... That's just Hometown/State/country pride. You have to have some pride in where you come from if you're to have any pride in yourself. You are the end result calculation of a mathematical equation of your geographical area and it's people.
If you're not proud of yourself how can anyone else be. That principle exists in everyone of a community - communities come together or faction fight within themselves, but will state their greater heritage than local against foreign entities.
Like Sports. I grew up in an area and as such, I'm predispositioned to like the sports teams in my areas. That's part of the equation that you're the calculation of. When it's say NFL football, I'm drawn to the team closest to my city. When it's college football, I'll root for my home city and main State Team. When it's the Olympics - I'm rooting for Team USA.
We here in the USA care more about USA folks in general - and as a society we aren't keen on beheadings... So I can understand why foreign nations care more about their own people and views. It's the terrible acts some groups tend to do or at least allow by lack of opposition that's bad.
When I look at HAMAS and Israel... One group is much more barbaric. One group has hate and murder as part of their culture ; the other exports diamonds, has the highest percentage of Doctors per Capita, and is way good with money topics.