Companies have reputations to uphold just like people do. If it's known that you work for a company and do something monumentally detrimental to its image, you should be able to be disciplined. The first amendment means you're safe from the government, not from the social fallout of your free speech.
The restaurant chain Texas Roadhouse recently fired a waitress who posted on Twitter that she wanted to "kill as many Mexicans as I could in one night." Social media is the place where people reveal their true selves - selves that are racist and violent. Therefore they should be held accountable for what they post since if that's their true self, it's one that shouldn't be allowed in society.
Indeed, it is true that, regardless of the shape it takes, writing is writing. A racist, hateful, and dangerous social media post is in many ways akin to leaving a note in public for all to see. If a person is not careful enough to deal with these psychological issues privately, they are more than asking to be fired from a job.
Yes, Texas Roadhouse acted responsibly by firing a waitress who treated an offensive message on social media. As an employee of the restaurant or any establishment, workers have the responsibility to maintain the brand of their employer. Extreme views published by employees on social media negatively impact the brand of the business.