I think the issue is that, while a country is certainly allowed to write it’s own laws, the idea that it is deeply fundamentally immoral for the government to prevent someone from saying something (or compel them to say something) is very deeply baked into the American zeitgeist (of which I am a part.)
So in the same way that a country is perfectly within its sovereign rights to pass a law that women are property or minorities don’t have the right to vote, I can still say that it feels wrong of them to do so.
And I would also decry a country that kicks out a company that chooses to employ women or minorities in violation of such a law, even if that is technically their sovereign right to do so.