Retaliation for union organizing is not legal, actually. It is not lawful to terminate someone for exercising their rights to collective bargaining - even in at-will employment.
For example: https://www.msn.com/en-us/news/technology/us-labor-board-say....
And: https://www.nlrb.gov/about-nlrb/rights-we-protect/your-right...