Not sure what you mean by "being a country," but, no, you wouldn't. If they didn't have jobs they couldn't stay. If they did they'd find housing - perhaps some would even build housing for the rest. To imagine that two billion people could move to the US, find employment, and all be homeless is to imagine an interesting form of market failure that I don't yet understand.
So they would definitely get back on planes rather than just going rogue and trying to stay in the country and working illegally? And existing citizens would not lose out through massive oversupply problems in the labour market?
I can't say I agree at all this would be of benefit to any nation willing to do this.
Like I've been saying in this thread, existing citizens are going to lose out anyway. The labor market is global. There is no way to have the government interfere in the free market to preserve jobs for certain people of certain backgrounds, and not have it backfire. It is already backfiring, in many industries.
So if you care about not making existing citizens lose out—which I do!—find a solution other than protectionism. Find a solution that works. A UBI, so that not finding a job doesn't ruin your life, is a good one. Fund it with income taxes on immigrants who come here and do well. (And on a UBI you can spend as much time as you want training in an advanced skill or learning a complicated profession so that you can compete in another segment of the labor market.)
No country is going to do this because no country wants to admit to their citizens that the "country" and "citizen" abstractions are powerless against the reality of the global free market. It's too politically incorrect; people would rather believe that protectionism works. But it's the right thing to do.
Not for all countries! Definitely an imbalance there, and US is already pretty generous with immigration numbers. We've also seen that cheap labor does not reduce cost of living in developed countries, so importing foreign cheap labor is a loss for not-rich folks.
That's not what I mean—what I mean is that labor is in the service of products and services, and the market for products and services is overwhelmingly global. You can get software from anywhere. You can get PCBs from anywhere. You can get oil from anywhere. You can get clothes from anywhere. You can get cars from anywhere. You can get produce from almost anywhere. (Prepared food is hard, as are a few other things like haircuts, but my argument is those are the minority.) Soon you'll be able to get truck drivers from anywhere with remote oversight of self-driving cars.
So if you're in any of these fields, you're competing with people around the world. You're not competing directly—the playing field is still quite bumpy—but it's becoming more level.
So if the actual goal you have is "I want citizens to not starve and be homeless," which is certainly my goal, protectionism is a temporary patch holding back a storm. One day it will stop working. Better to prepare for that day instead of denying it.
(Unless you plan on dying before then and don't care about your kids' future, but I assume all the people in this thread saying "culture" care about that....)
OK, I am fine with amending my proposal to "any job that pays at least a living wage in the area where you live."
A bonus of that amendment is that if you want to bring family, you must all in sum earn a living wage for your family, but you can split that however you want, so e.g. you can legally bring children who aren't going to work or legally take more than 90 days to raise a child.
(Also it might embarrass the government into raising the minimum wage for citizens to a living wage.)