I think it's largely because they're unable (or unwilling) to put themselves in the shoes of the person they hate.
How can you hate immigrants when you know something about the circumstances they're fleeing from (civil war, famine, discrimination, economic failure, dictatorship) and how gruelling was the journey to a more civilised country? What would you have done in the same situation as them? Wouldn't you also decide life could be better somewhere else?
How can you hate a bullying employer who maybe has money problems, has mental health issues, has a crumbling marriage, has difficult children, has a parent with dementia? Would you not have sympathy for a person who's facing so much adversity on so many fronts? There but for the grace of God etc.
How can you hate the unemployed when there may be good reasons why they're unemployed - they have a serious illness, they lack the necessary skills, employers are prejudiced against black people or women or ex-prisoners. But the assumption is that the unemployed must be work-shy layabouts.
Of course hatred can be based on many things. It can also be based on jealousy - resentment against those who seem to be having better lives. It rankles intolerably that other people have more luck, or are especially talented, or just know how to climb the greasy pole. But again, are those people having the fabulous lives you credit them with? Or are their private lives a disaster?
You don't have to hate people. You can still dislike them and you can still be annoyed by them. Isn't that enough?
Pic: a work-shy layabout


