Anonymity lets you induce cognitive dissonance in people you disagree with without real life social consequences. The troll derives pleasure not just from anger or frustration, but knowing they’ve left a logical knot which will require untangling a whole region of knowledge.