HR is usually drilled to fire people who can generate bad publicity, and that's why they are acting in OP's situation.

Free speech preserved!

How is that free speech when you are fired for your opinion?

If you are fired because you are not "a pretty girl" and the argument is "the public prefer pretty girls, so we do it to increase sales", it is still discrimination, it is still sexist. It does not matter if you blame it on someone else: if you fire someone because of their opinion, you are discriminating. If the fact that someone has an opinion costs you some money, then it costs you some money, your financial profit is not important, you are not the centre of the universe, and if you act to preserve your profit over the fairness and justice, then you are just a parasite that should be excluded from a civilised society.