Eliezer Yudkowsky said this quote

Because the way people are built, Hermione, the way people are built to feel inside - Harry put a hand over his own heart, in the anatomically correct position, then paused and moved his hand up to point toward his head at around the ear level, - is that they hurt when they see their friends hurting. Someone inside their circle of concern, a member of their own tribe. That feeling has an off-switch, an off-switch labeled 'enemy' or 'foreigner' or sometimes just 'stranger'. That's how people are, if they don't learn otherwise.