Correct, firing someone for trying to unionize is illegal. It is illegal to retaliate against workers for trying to unionize. It's not prohibited, to the best of my knowledge, to receive a contract from a union and say, "these term's aren't competitive, we'll find other workers". Otherwise that would effectively give unions unlimited power over companies.
In the US, it looks like you can "permanently replace" union workers who are on strike.