The vast majority of them came through Ellis Island and came legally. Many Mexicans also make the decision to come legally -----amnesty just rewards law-breakers.
Yup all they had to do was get off the boat and be processesd(90% were accepted), after that they were free to go anywhere.
They also did the jobs no one wanted. They worked hard to make a better life for their family. They also faced scorn.