> They get to live and work legally in the US and get a salary paid in US dollars.
If this is so good why the need for a UBI for citizens in the first place?
Because the US should want to provide a better quality of life for its citizens than what those people feeling and risking everything in a desperate attempt to get into the US have in their home countries.
They get to live and work legally in the US and get a salary paid in US dollars. That seems to worth a lot to a lot of people. You are of course right about the very obvious two class system it will create and the long term social consequences of such a system are tricky to predict.
Edit: The US birthright citizenship rules might actually make this harder to implement.