Tired, Poor, Huddled Masses
A more accurate brief history would include the following highlights:
- Xenophobic tribalism goes back to the first tribes in caves. There's always been us vs. them tribalism.
- The ability to deport foreigners goes back to John Adams, our Second President, and first ideological Democrat (at heart), and the Alien & Sedition act of 1798. (Not counting the laws before we were a country to exclude some foreigners, or drive them out).
- Democrats first official President (Andrew Jackson) was famous and popular for exterminating Indians. If the Democrats truly cared about "others", he would have been their last President, instead of their first.
- Many states had their own immigration laws, but in 1875 it became a federal power and the progressive federalists (Democrats especially) used this invention to institutionalize their racism at the national level. The rise of organized labor, progressivism and the appeal of marxism all had an anti-immigrant view of things -- and now they had the power to encode that in our laws.
- Some will quote the plaque on the Statue of Liberty from 1886, which includes, "Give me your tired, your poor, your huddled masses yearning to breathe free"... it sounds great. Until you remember history. That was a French Statue, and Europe loved the idea of sending all their malcontents, debtors, poor, and criminals abroad, so this was their propaganda as much as ours. They used America as a dumping ground and social program: if you're a problem, they would sometimes pay for your trip to Canada, Australia or the U.S.
- A few years before the Statue was being dedicated, we had passed the Naturalization act (1870), the Asian Exclusion Act (1875) and the Chinese Exclusion Act (1882), all to exclude/cap those who were too poor, huddled or Asian (mostly because of the Democrats).
- During Calvin Coolege, the quota's were cemented in. But in 1952 (McCarran–Walter Act) the Republicans were able to revise this (over Truman's veto), to abolish the racial restrictions (loosen the quotas), and finally legally allow Japanese and Koreans in at all. 
- Also in 1882 we added head taxes (to offset the cost of processing), and prohibited entry to the U.S. for convicts, indigent people, prostitutes, and lunatics or idiots. (Burdens on society).
- Anarchists, epileptics, and those with bouts of insanity (manics), were banned in 1903
- Infectious diseases, physical or mental disabilities, were excluded immigrants in the Immigration Act of 1907
- Literary Requirements were attempted to be added in 1897, 1903, 1912, and finally stuck in the 1917 immigration bill. 
- Under Coolidge (r) the quota system was formalized, with near equal party support. , but the Democrats took over for a generation or two under FDR and gave us many things like Executive Order 9066 (FDR's internment of Japanese, Germans and Italians).
Finally, in 1990, it was George H. W. Bush that allowed in homosexual immigrants.  That's something you don't hear much about.
Many of the quotas and anti-immigrant sentiments and laws were started by the left. (Think Jackson or Breckinridge). The right was more likely to believe in meritocracy and pro business -- so more cheap labor never concerned them. But as the left concerned itself with things like social programs and driving up wages, they hated cheap immigrant labor, and treated them accordingly.
Statue of Liberty plaque is an ideal promoted by the French, but it isn't reality of our immigration laws:
Your huddled masses yearning to breathe free,
The wretched refuse of your teeming shore.
Send these, the homeless, tempest-tossed to me,
The left will use this to proclaim, "we used to have Open-Borders, it's what made America Great"... they'll say out of one side of their mouth. While proclaiming America was never that great out of the other. But the facts are more nuanced. We often oppressed immigration from places too unlike us (Eastern Europe, the Middle East, Far East, and so on). And we wisely wanted workers looking for opportunities, and discouraged those looking for handouts.
The problem is that you have open borders, or Social programs, but not both -- or all the moochers in the world will come and swamp your social safety nets, and create backlash.
- Status of Liberty: https://en.wikipedia.org/wiki/Statue_of_Liberty
- 1870: https://en.wikipedia.org/wiki/Naturalization_Act_of_1870
- Chinese Exclusion Act: https://en.wikipedia.org/wiki/Chinese_Exclusion_Act
- 1903: https://en.wikipedia.org/wiki/Immigration_Act_of_1903
- Literary Requirements: https://en.wikipedia.org/wiki/Immigration_Act_of_1917
- Coolidge: https://en.wikipedia.org/wiki/Immigration_Act_of_1924
- GWB & Gays: https://en.wikipedia.org/wiki/Immigration_Act_of_1990
- Back; Is Trump a racist?