It was never that automatic in the old days. From Ellis Island, for example, over 120,000 were sent back.
"New arrivals were processed quickly. In the Registry Room, Public Health Service doctors looked to see if any of them wheezed, coughed, shuffled or limped. Children were asked their names to make sure they weren't deaf or dumb. Toddlers were taken from their mothers' arms and made to walk. As the line moved forward, doctors had only a few seconds to check each immigrant for sixty symptoms of disease. Of primary concern were cholera, favus (scalp and nail fungus), tuberculosis, insanity, epilepsy, and mental impairments. The disease most feared was trachoma, a highly contagious eye infection that could lead to blindness and death.
Hospital Wards
Once registered, immigrants were free to enter the New World and start their new lives. But if they were sick, they spent days, weeks, months even, in a warren of rooms. Some, like the tuberculosis ward, were open to the sea, where a gentle New York harbor breeze cleansed their lungs, improving their chances. Other rooms were solitary, forlorn places where the illness itself decided when to leave or stay. Most patients in the hospital or Contagious Disease Ward recovered, but some were not so lucky. More than 120,000 immigrants were sent back to their countries of origin, and during the island's half-century of operation more than 3,500 immigrants died there."
"New arrivals were processed quickly. In the Registry Room, Public Health Service doctors looked to see if any of them wheezed, coughed, shuffled or limped. Children were asked their names to make sure they weren't deaf or dumb. Toddlers were taken from their mothers' arms and made to walk. As the line moved forward, doctors had only a few seconds to check each immigrant for sixty symptoms of disease. Of primary concern were cholera, favus (scalp and nail fungus), tuberculosis, insanity, epilepsy, and mental impairments. The disease most feared was trachoma, a highly contagious eye infection that could lead to blindness and death.
Hospital Wards Once registered, immigrants were free to enter the New World and start their new lives. But if they were sick, they spent days, weeks, months even, in a warren of rooms. Some, like the tuberculosis ward, were open to the sea, where a gentle New York harbor breeze cleansed their lungs, improving their chances. Other rooms were solitary, forlorn places where the illness itself decided when to leave or stay. Most patients in the hospital or Contagious Disease Ward recovered, but some were not so lucky. More than 120,000 immigrants were sent back to their countries of origin, and during the island's half-century of operation more than 3,500 immigrants died there."
http://www.pbs.org/wgbh/amex/goldman/peopleevents/e_ellis.ht...
And that's not even covering even less-friendly actions, like the Chinese Exclusion Act.