They have to get incardinated in a diocese. Many of them belong to religious congregations, but some do not.
In a lot of cases, a priest who is “on the loose” may not be a good idea, and we actually have had some foreign priests in my diocese who were either (a) supporting their wife and children back in the Phillipines, or (b) bringing in their family members from Poland just before they had their nervous breakdown or terminal bout of alcoholism. And this is true of ones who were just free agents and ones who were members of religious orders (which obviously just wanted to get rid of them and dump them on the US).
You can get good foreign priests and you can get bad ones. But the same is true of native born priests.
The whole thing depends on the bishop. Good bishop: good seminary, good local priests, good foreign priests. Bad bishop...well, figure it out.