You are confusing two things. Accepting immigrants is the humane thing to do.
Perpetuating economic inequality across the world is not.
Millions have to choose between working for meager salaries in one place or move to be exploited elsewhere. They are getting the short stick both ways.