So it's a decision between violating the law and acting unethically?
It's totally unreasonable to suggest that companies should have to hire random people from nation xyz only to have to sponsor their impossible work visas.
And I say this as someone who was on work status for a very long time.
Clarity, consistency, simplicity, predictability - this is what people want.
Because 'discriminating against people of other ethnicities' is kind of as old as time, the issue triggers our empathy radar a bit, which is reasonable, but in reality what would be 'the most fair to everyone' is just clear rules, and very light but important anti-discrimination aka can't discriminate on age, race, gender religion aka the basics.