If sapolsky is to be believed we have the natural inclination to view in- and out- group as part of our brain. Everything else is learned or a coping mechanism. I guess this is why people propose lived multiculturalism especially during childhood as a solution to xenophobia.
No matter if he can be believed or not on this fact the book is fun wiki