From this thread it seems to stem from simplifying large groups of people by negative stereotypes.
"All Xs are stupid."
"I'm an X and I say all Y are ignorant cucumber eaters!"
"How dare you, as a Y you know nothing about us you dirty X. Why don't you clean a train!"
"That's an outdated perception based on limited experience with Xs and poor media representation."
"A fair point! Perhaps my aggression is directed toward Xs due to a sense of my own life lacking!"
"And my knee jerk reaction to Ys is based in deep insecurity of other Xs I know!"
"..."
"..."
"Well, least you ain't a Z."
"I hate Zs...with their hats."
"Fucking right, Zs and their hats. Bunch of wankers."