The reality of modern life is that we all live in the same small town now. Anyone who grew up in a small town, a really small town, knows what I mean. Everyone knows your business in a small town, everyone has an opinion, and something you do young is likely to follow you the rest of your life and have tremendous impact.
It sucks. It's one of the big reasons so many people haul ass out of their small town just as soon as they can. The anonymity of urban life is attractive. No one knows you, and if you get drunk and do something stupid, no one notices or cares, because there's always another guy over there acting drunker and stupider. And if it's big enough they do care, they'll forget next week when something else comes along.
It's shitty. It's awful to say something stupid and have the entire world land on your head, but I can't see that there's anything to be done about it short of not doing it yourself. Like pile-ons in threads, when you say something outrageous, people are going to react. Sometimes thirty or forty, sometimes ten thousand. It's not as if they've decided to collude with one another to destroy someone, it's just that everyone feels the need to express their own opinion on the subject, so you get a huge wave of individuals hitting you at the same time.
It's the nature of instant, hyperlocal communication, unfortunately, and I suspect it will get worse before it gets better. At the moment, there are still language barriers that reduce the size of the population that's going to land on your head, and still places where internet isn't widely available. In the near future, instant translation and acess to the net will become ubiquitous, and the entire multi-billion population of the world is going to see that thoughtless thing you posted.
To be clear, though, it isn't an angry horde firing people, it's their employer. If you want to protect people from getting fired for this sort of stuff, the idea that employers are allowed to fire people for things they do outside of the scope of their employment has to be seriously looked at. You can't stop the speech -- not only does that violate the law, but it's practically impossible -- but you can do something about the repercussion regarding employment.