1. Target audience, we're less prone to being polite and conform to social norms with strangers. Simply put, in a forum full of nicknames and no physical connection with the people behind those nicknames we often don't care what they think.
2. Anonymity, there's no consequence to behaving badly/rudely. In fact some people are encouraged they managed to upset another person.
3. Motivation, often when a person is confronted with a similar pattern or argument they would opt to dismiss it, as quickly and as long lasting as possible. This often happens with rehashed debates when people simply give up or excuse themselves from having to explain or repeat. They resort to an emotional response, anger, trolling or ridicule. Often a mix of a few things.
So it regresses to a response that may be useless to one person and more useful to the person responding. Instead of wasting their time hearing something they disagree with people want their beliefs reinforced, not challenged. This is doubly true if the challenge is obviously flawed or flat out wrong.
So more often than not, when someone asks a question that has an obvious answer, is flawed etc someone will make fun of it. A social currency if you will, I have taken time to consider your words, you have said something I deem foolish, I wasted my time but have made fun of you as to at least derive satisfaction. right, wrong, moral or not.
It also allows some people to get attention. This is especially easy if they are consistently funny and other users read their responses, jokes, input, trolling etc.
4. Medium, The way we process written language differs to the way we process verbal language. Typing often allows you to put down raw thoughts that you later revise, edit and refine. When we speak we often think twice about what we are saying, to whom and how that may sound to them.
Conveying emotion is text is much harder, there is no tone of voice, no pitch, volume, pronunciation or accent etc.
5. Human nature, being rude, trolling, it may be a form of rough play. I believe it is imperative that some people experience some of that rough play, it's character building and will allow them to understand they are not a special and unique snow flake that happened to be the 8th winner, their just dumb, fat and live in their mother's basement.