Well. It is pretty grounded in tradition now. There was a long time that the US had plenty of room and not enough workers was holding us back.
Now we still have plenty of room but not where anyone (except the very very desperate) wants to live, and not enough workers but not for jobs that anyone (except the very very desperate) wants to do. Both those vacancies could still easily be filled by
legal immigrants—which is to say, making it easier for people to
become legal immigrants rather than having to hop the border and lay low—but then we'd have to actually pay them at least minimum wage. It's been so much more convenient to have a workforce that are perpetually exploited with the threat of sending them back where they came from if they complain. The mainstream right understands this, but they can't say it out loud. Instead they've occasionally made empty gestures about how "illegal immigration is a big problem and someone should do something about them" to remind their workers how thin of a string their livelihood (such as it is) is hanging from.
They didn't figure on a sizable voter bloc completely missing the point of it all and instead taking it as a genuine call to action, nor a charismatic (by the standards of said voter bloc) loudmouthed dumbass
also missing the point and leading the charge. But they can't do anything about it now. Owning up to it having been a ruse wouldn't win them any favors with anyone.