1) For any given case, yeah, there's probably no protection. This is because we love freedom. No, really. Well, if you can get an honest answer from politicians and CEOs that's not the reason, but to the average "man on the street" who's against stronger worker protections, that's the reason. That or unemployment scaremongering. Really.
2) On the off chance that there is a law, and you know there is, can you afford to be without work and to pay lawyers long enough to fight to have it enforced? Do you even know where to begin? If not, nothing happens. (think minimum wage workers)
3) Is it worth even a small risk of a de facto blacklisting in your industry, permanently limiting your future employment options (and therefore how much you earn)? If not, nothing happens. This is related to the "everyone Googles you these days" thing mentioned in the article. (professionals, skilled trades)
In the end it's riskier for to individuals, on average, to fight these things than it is for businesses to break the law, so little is ever done. That's assuming there was even a law to be broken.
Collective action (class action lawsuits, for example) can help but is nearly impossible to organize effectively without unions, which we've been successfully convinced to hate on principle. Every so often there's a lawsuit, businesses are slapped with fine that's a rounding error in their account books, everything goes on as normal.
But the actual reason why these people are getting fired is because employers are scared shitless of these digital lynch mobs. To them, _not_ immediately firing a person who makes an offensive joke means the employer tacitly approves of the employee's behavior and thus the _employer_ becomes a target.
Apparently, you can also be fired in Germany for "disturbance of the general working environment"
Very few things count as legally protected classes. Its generally limited to race, religion, and gender. Even then the fired worker would have to prove that they were fired because of their membership in a protected class and not for some different reason. This means, at minimum, a lawsuit and I'm sure you can imagine how lopsided lawsuits between well funded corporations and your average private citizen are.