But, hey, it drives visitors to return, so it has to be good, right?
I disagree. Give them a non-persistent outlet. Something like a shoutbox, where the trolling disappear after 5 minutes.
Is it really a myth?
Basically, anonymity allows people to treat everyone around them as utter foreigners—you don't expect me to have any grounding in your culture, and I don't expect you to have any grounding in mine, so neither of us "needs" to be upset when the other does something that is uncouth. Because of this, discussion can concentrate more on facts, and less on signalling, which I (and I think many introverted people) find a less stressful mode of communication.
Tangentially, I think this explains why many people on the internet have a annoyance-trigger at the undefined name-dropping of specific locales within, say, the US (with the usual response of "we're not all from the US", even if the person stating that is, in fact, from the US)—it grounds the discussion in a specific culture, which increases the likelihood of some subset of the people in the conversation finding a valid means of conveying subtext—which then leaves others out of that subtext, creating a kind of I-can't-enforce-norms-I'm-not-aware-of anxiety which is projected into a problem with the context being introduced in the first place.
In a lesser way, this is also why people tend to overreact to women who identify themselves as such on the Internet: they're introducing an ambient cultural context that increases norm-enforcement anxiety. (Interestingly, there's a specific name for Internet-age gender-role-relative-norm-enforcement: "white knighting." It's quite common to see people calling the practice out, though usually even the people themselves aren't sure precisely why they're unhappy about it.)
Anonymous communication over the internet (for all its many, many virtues) depersonalises communication, and that has both good and bad results.
On irc, if someone decided to hold a grudge I can simply add them to the short list of people I've put on permanent /ignore. In real life I have to deal with them on a daily basis.
There is also the added benefit of irc having scroll back and delays in communication. I can read what I've said before so I don't forget what I'm talking about. I can also walk away for 5 minutes to grab a drink and cool off if the debate gets heated. It would be very difficult to do either gracefully in a live conversation.
1: Example topic: The death penalty.
One of my coworkers has voiced a strong opinion on putting to death anyone that kills another human being except in a clear cut case of self-defense. I disagree with his opinion in the strongest way but I keep my mouth shut because inviting a civilized debate over that topic is a good way to ruin an otherwise enjoyable lunchbreak. On IRC, I would be happy to invite debate because the cost of the debate going bad is far less.
The model seems to be based on an archaic idea of man, much like the late 1960's concepts of deindividuation--the idea that underneath our civilized personality, there resides an instinctual force that is inherently wild, dangerous and destructive (neglecting any peaceful, friendly or cooperative traits that we also seem to possess).
More recent models like the 'Social Identity model of Deindividuation Effects' take a more systematic approach to considering further individual and situational variables and how they work together.
Owing to the enhanced complexity, these newer models do a much better job at explaining the factors and processes at play in computer-mediated communication, but they of course make for a much less catchy story.
But how does it help us know how to stop trolling? Simply saying, "it's complicated!" without offering workable solutions doesn't help us here.
As for practical recommendations, I've seen very few come out of academic research, unfortunately. From SIDE you could derive that you should aim to create a community or an idea that people identify with in a positive way (thus creating a social identity), and try to facilitate the salience of that identity by adjusting the situational setting.