No matter where someone comes from, both of these things are a possibility on an individual level, but at a population level, it’s more likely to move one way vs the other.
There is also the issue of supply and demand. Some countries have a lot of people wanting to move there, other counties, not so much. If those desirable countries let in everyone, without a rate limit, they’d likely become undesirable pretty quickly. Housing and resources shortages, for example. Resource shortages quickly lead to crime, and it snowballs from there.