I find that it depends on the size of the community, and your stake in that community. If you're a regular somewhere, you're a lot less likely to start some shit there. After a while some users earn a reputation that affects all future interactions.
I treat my local subreddit like I would treat my local pub, especially since I know a few of its users IRL, and many tie my username to my business. I can't say the same about large subreddits.
Tight moderation also helps a ton. It enforces a certain tone, and after a while the community crystallises around that tone and enforces it itself. You don't pick fights at the country club.
I realise now that I stopped interacting in larger communities. I prefer quieter channels where people have a reputation to uphold.