While that makes sense, the people that enter illegally often don't have the means to enter legally. The USA should provide an easier way for these immigrants to get green cards and citizenship, but the way the system works ends up filtering out the poor, the very demographic that would benefit most from living in the US. We give them no other option but to risk coming into the USA illegally with a chance of getting their families separated for the sake of giving them a better life, or stay in whatever country they're in and sentence them to a life of poverty and danger, where they most likely will never become wealthy enough to live a healthy lifestyle and also risk living amongst ramant crime. Let's also not forget that many of the "immigrants" from Nicaragua. In case you didn't know, Nicaragua is in the middle of a full-fledged revolution, and it's heating up. So many of them have fled the country to come to the USA and seek asylum or refuge. They are legally considered refugees. We've not just turned these people down, we've taken their children from them and put them in "shelters" that are horrendously unsanitary.
Americans often talk about how much we love our country. We act like our country is the greatest in the world, wave our freedom around like a flag, and talk about the rights every person in our country is entitled to, no matter their race, gender, ethnicity, or social class. Yet, when people come to our country, illegally or legally, they are greeted with blatant xenophobia and fear-mongering. If we as a country are going to say the things we do about ourselves, then we ought to at least act like it and treat these people with some semblance of humanity and compassion.