Why is it racist to protect our demographics in the USA but it isn’t racist in a brown country for them to protect their demographics?

So we have to allow Mexicans to keep coming in but this country is meant to be majority white. It was 80% white back in the day and today things are changing rapidly because we are being forced to accept brown people in our country.
Why is it racist to protect our demographics in the USA but it isn’t racist in a brown country for them to protect their demographics?
Post Opinion