You must distinguish between purpose of a company, local law, and personal motivations of management.
For vast majority of companies primary purpose is simply profit. There are certain large companies (Google and Disney for example) that use their position on the market to push certain political ideas (usually leftist and globalist) even if that hurts them economically, but they are in a minority.
As for the matter of law, most companies do try to obey letter of the law, at the same time trying to find loopholes that would help them with their primary purpose (i.e. profit) . In our case, as you said yourself, law does not protect employee.
Finally, we have personal motivations of the management, which includes ethics. Note that motivation of the management does not need to be aligned with the purpose of the company: for example manager A is criticized by employee B for his shortcomings, therefore manager A fires employee B to save his own skin. Manager A does not act in the interest of the company, he acts in his own interest.
Now we come to the main question, what is more important : personal interest, interest of the company, or interest of the society as a whole.
If you consider business world to be "dog eat dog" and "every man for himself", then firing employee who expressed view potentially harmful to the interest of some manager is justifiable. Of course, in such world nothing would stop that employee to try to return the favor as best he could.
If you consider interest of the company as most important (as we said, this usually means increasing profit as much as possible), then firing employee for his criticism could be justified only if such critique somehow harms the company. Since you excluded whistle-blowing (i.e. going outside with critique) this reduces potential damage therefore firing someone for his expressed opinion would be hard to ethically justify.
Finally, if you consider interest of the society as a whole as most important, it is virtually impossible to imagine opinion that would warrant firing, but not the punishment from that society itself. For example, certain countries criminalize certain ideas and expressing them could land you in jail (for example Holocaust denial) . But in that case law takes precedence over company laws, therefore it would not be ethical to fire someone because law already prescribes punishment.