I don't know if they are legal or not. But assuming you don't want to leave a company, there is minimal tact of what to say when.
You have a choice not to use said tact, but this entire "employee goes on moral crusade, gets fired, goes on moral crusade about firing", is a feature of a kind of employee that is even for other employees not amazing to be around