Such things happen because of "dehumanization."
As Zimbardo writes "at the core of evil is the process of dehumanization by which certain other people or collectives of them, are depicted as less than human, as non comparable in humanity or personal dignity to those who do the labeling. Prejudice employs negative stereotypes in images or verbally abusive terms to demean and degrade the objects of its narrow view of superiority over these allegedly inferior persons. Discrimination involves the actions taken against those others based on the beliefs and emotions generated by prejudiced perspectives.
Dehumanization is one of the central processes in the transformation of ordinary, normal people into indifferent or even wanton perpetrators of evil. Dehumanization is like a “cortical cataract” that clouds one’s thinking and fosters the perception that other people are less than human. It makes some people come to see those others as enemies deserving of torment, torture, and even annihilation."
What I keep coming back to are the words from our Baptismal service...
"That we are to seek and serve Christ in all persons, loving our neighbor as ourselves and that we are called to strive for justice and peace among all and to respect the dignity of every human being." (BCP p. 305)