Of course, the subjection of indigenous peoples, the stealing of their land, making war upon them and breaking treaties with them was perfectly legal when Europeans "legally" (according to whom?) migrated here. I mean they, Indians, were just savages. The racial hierarchy, at least in the European worldview, not really so in reality, during colonial times was as follows: civilized, barbarian and savage. I wonder who racially is at the top of that ladder? That's, European immigration to America, a good example of legal immigration, legal when it fits a certain narrative. I'd call it a slow-moving, ill-thought out genocide hiding under the mask of "settling" the land. The disturbing truth is this: many white people are absolutely resistant to sharing power with those that do not look like them. This has been true since 1492. It's a bit of a sickness and its a major factor in resistance to immigration.
Just to clarify, I am not an open borders proponent, I believe in measures to regulate immigration, just not mean spirited punitive ones.