What does a hacker have to gain from taking something apart, poking at it, and putting it back together again?
Also you gain skill of knowing that you can take something apart and be able to put everything back together again, which is often harder than it sounds.
The answer that's related that I was trying to elicit is "because it interests me to know how things work." By the same token, trolls derive the same sort of intellectual pleasure from trolling: to anger someone is to own them. They do it "because I can."
Real trolls aren't the ones that are going "lulz obama is a socialist," "ruby is better than python," or anything so obvious. The real trolls are the ones that sound reasonable, but slowly end up destroying your community by creating discord much more subtly.