Why?
Because it is the role of the federal government to protect the nation's borders.
Just as it was the role of the federal government during earlier waves of immigration when most immigrants were processed through Ellis Island (or similar disembarking points).
"Give me your tired, your poor,
Your huddled masses yearning to breathe free,
The wretched refuse of your teeming shore.
Send these, the homeless, tempest-tost to me,
I lift my lamp beside the golden door!"
That "golden door" should always remain open to the poor and huddled masses (as well as the wealthy and elite), but in a manner that protects the security and welfare of the citizens within.