You're allowed to say whatever, that doesn't mean I'm forced to employ you.
If you call your boss an asshole, that is free speech. And you will be fired. Welcome to the real world.
And, if you favor free market dynamics instead, consider: as CEO, you are the face of the company. Perception is a form of advertising.
You don't want negative advertising. Ultimately his views and donations were costing Mozilla actual money. People were upset, and that matters when you sell stuff and ask for donations.
Him being fired was the free labor market at play.