Some day people will figure out why all these Musk types, massively benefitting from immigration, express anti-immigrant viewpoints. They don't want immigration to stop completely, and it will not stop completely. They don't even want illegal immigration to stop, if anything they prefer it. Do drug dealers want drugs to become legal? Hell no, it would destroy their profits.
The idea is to make immigrants a scape goat for all their problems. The more marginalized the immigrants are, the more easily they can be exploited. Undocumented immigrants are the easiest to exploit of course.
I've seen it so many times here in Greece as well. You go to a lot of the rural regions, and everyone hates immigrants and votes for anti-immigrant platforms. It's odd at first, since they don't even have that many immigrants compared to the cities. Then you realize that all these ex-farmers are now farm owners: they don't work the land, they have immigrants working for them. They might complain that non-immigrants don't come to work for them, but the reality is that nobody would want to go work for the money they give to Bangladeshis, or put up with the conditions they have them work under. A lot of the "farmers" know that, and know how much they actually need immigration, but they vote and speak against it anyways, because they want to weaken the bargaining position of their immigrant workers. They also use anti-immigrant rhetoric to torpedo attempts to organize workers in places which employ both natives and migrants.
Musk couldn't make all of this any more transparent. Of course, you can't really ship in undocumented engineers, they have more options, hence the need for H1B visas. But they will still put up with so much more than non-immigrants.