Exactly right.
When my grandparents came in through Ellis Island, one of the requirements for being allowed in this country is that you either did not have a criminal history or you were not wanted for crimes in the old country.
Nor could you be morally compromised, nor sick.
And, if they were send back, it was on the spot decision by the officer in charge.
No catch and release, court hearings, appeals, etc.