George W Bush wanted to grant amnesty to how many milions?
And both openly stating it would land instant new thankful Republicans.
The image vs reality is beyond glaring, and stereotypes parties and immigrants both. The assumption that immigrants are so stupid that they are oblivious to the callous taking for granted exhibited by Republicans is insulting and steers them away from the party.
In the meantime, being given to business interests, the fact that citizens can't be paid low wages and otherwise exploited like illegals causes the party to also take this anti citizenship stance.
Anti (Mexican)immigration goes back a century or so, vacillating with swings in the economy. Witness how it was approached in the 20s, and how it swung when the Great Depression set in, then after.
Now, of course, it's become this rallying cry for Trump & his constituency, crawling out of the Great Recession.