Because border controls are a lesser evil than absence of border controls, and they are heavily based on trade agreements, not on personal attributes.How is it that governments get away with racism?
That isn't the response, as well you know.If I'm a Samali man and ask the UK government if I can live here they will say "No, you are the wrong race - we don't want you".
If anyone doesn't have right of entry then they are denied entry. If being from a particular country equates to absence of that right, then it's a border control, not a racist remark, or attitude, or policy.
I don't know why you think that. A Dutch citizen has right of entry, but your comment isn't rooted in racism, merely in a wrong understanding.If that Somali then goes to Holland as is naturalised and comes back as a Dutch citizen and I say "Go away, you are a Somali, you are the wrong race" - I'd be deemed a racist.
I'm sure you could find an unpleasant way of saying "Go away", but unless you qualified what "wrong race" means, i.e. put it terms that stated or implied a belief of inferiority based on race, then it would remain merely unpleasant and nothing more than that.