He was not fired. Straight from Mozilla themselves:
https://blog.mozilla.org/blog/2014/04/05/faq-on-ceo-resignat...
"On April 3, 2014 Brendan Eich voluntarily stepped down as CEO of Mozilla."
He could have stayed if he wanted to. Yes, it would have hurt their brand if he did, and yes it should have. Because yes, I and many others care very much if the CEO of a product donates to strip a minority of equal rights. Thanks to people like Eich, for seven years me and my husband had to lie and check "single" on all of our federal and state forms. For seven years we had to worry about being denied hospital visitation should one of us fall ill. We had to worry about how we'd handle inheritance should one of us pass. And on and on.
So yes, everyone is entitled to their own voice. Eich had a right to make that donation. And other people had a right to protest and boycott over it. Mozilla did not cave to the protests, so there was no free speech violation here.