Somewhat untrue in theory. Completely untrue in practice. There are a few things you legally cannot be fired for, and a whole plethora of things a company would need to very very careful about firing you for, lest they wind up in court.
There are also laws that prohibit employers from punishing employees in certain circumstances relating to organizing/petitioning when in regard to concerns about workplace issues.
For example:
>You have the right to act with co-workers to address work-related issues in many ways. Examples include: [...] joining with co-workers to talk directly to your employer, to a government agency, or to the media about problems in your workplace
https://www.nlrb.gov/about-nlrb/rights-we-protect/the-law/em...
edit: Given how fast this post hit -4, I have to assume that these people are *OK* with being able to fire gay or trans people at a whim. That ain't cool, one bit.
Supreme Court rules workers can’t be fired for being gay or transgender
https://www.cnbc.com/2020/06/15/supreme-court-rules-workers-...
Instead it's called "lack of culture fit", "insubordination", or a myriad of any other right-to-work excuses as to fire someone you disagree with.
But yes, for those stupid enough to put "Fired because of gay", well, it still is legal due to the loopholes a Mack Truck could drive through. https://www.courierpress.com/story/opinion/columnists/jon-we...
Therefore, the relevant question is not "is the company within its rights to fire these employees", but rather "was it a good idea for the company to fire these employees".