From what I've seen of online harassment it's the manifestation of deep unhappiness and insecurity. It's a need to assert authority and status over others to prove they are 'better' in some way.
Targets often seen to be women who are particularly successful and self assured. And not 'feminine' in the sense of stereotypes. Women who take on leadership roles seem to be a magnet for it.
Harassment tends to be done in a group fashion, where there is an egging on of others usually against a single target or picking off people one by one in an attempt to make them quit. Making someone quit is the goal.
I've seen people seeing it as an extension of online war gaming. They see what happens out of game as important as what happens in game. Its regarded as part of the 'psychological warfare'. I've seen people actively quoting Sun Tzu over Facebook games!
Many of the tactics I saw 10, 12 or more years ago are actively being used throughout politics today. Its all over social media. But its roots start in gaming.
It's also why people with a background in gaming, going into politics are a lot more viralent and aggressive and divisive.
And the thing that sends them crazy more than anything else in my experience is just calling it out, staying calm, refusing to engage in similar behaviour and above all else being reasonable.
Its tiresome, tedious and utterly pathetic.
People can see it for what it is. It's hard in the midst of it. It can destroy lives. It's remarkable how people who initially support the bullying eventually change their minds if the line is held.
Just keep talking and being reasonable.
And that's why I try to be calm online even if utterly raging and screaming in real life. Showing that side of yourself is what they want and the reaction they are trying to provoke because it makes them feel powerful.
Don't give them the satisfaction. It only feeds them. It's like zombies smelling blood. They all come out the woodwork, if they get a sniff of it.