Personally, I think it has less to do with things like anonymity, up/downvotes and other gamey systems employed that tend to get blamed and more to do with the communities themselves.
Specifically, their size. But also, the willingness of moderators to enforce a few basic rules of civility.
I think they suffer from that same phenomenon that makes cities on a whole, less friendly than smaller towns and communities. I realize there's exceptions, but speaking generally this tends to be the case.
To further the comparison a bit, you're also more likely to have the police respond with favourable results to personal and petty crime in smaller towns.
You can see the same things in smaller internet communities. Whether they're pseudonymous or not or whatever kinds of upvoting systems they have or not, there's less people, moderators tend to respond more quickly to personal attacks and things and usually in more reasonable ways than automated algorithms.
Again, generalizing, but when communities are small enough all the people participating are recognizable and when moderators are active in enforcing those basic rules of conduct, people tend to behave a little more reasonably.
As a sidenote, I'll throw HN in as an exception to the size thing, because it's a pretty large community, but dang and the mods are like super human or something so manage to keep the conversation pretty civil most of the time here.