Firing someone for being opposed to same-sex marriage is political in the same way firing someone for robbing a bank is.
Equivocating speech and crime as both being "violence" (of similar class, deserving similar response) is a fallacy that lets people justify murder in response to disagreement as long as it's deemed serious enough.
Also, you can absolutely be fired for just saying something and that's been the case forever. As a CEO, you are essentially marketing your company. Marketing it poorly and losing customers can, and will, get you fired - in every company, ever.
That being said, I disagree with Eich and it probably made sense for the org to let him go given how his views might impact public perception of Mozilla.