I’m not going to write an essay. But just to give you an idea:
We allowed certain groups to immigrate in the U.S when we needed them. If we needed them for cheap labor like factories and mines in the 1920s. Or if we need them to pick our fruit and provide cheap unskilled labor in the 2020s. The problem then becomes how do you tell these people to “go away,” in a sense, when we no longer need them or we are under a crisis. When we don’t need them, it becomes the basis of creating laws that target specific people to get them out of the country.