Another society does not have an implicit duty to allow them to enter it. Though it may receive utility or economic benefit for members of it by doing so in which case it could choose to allow them in.
imagine you wake up as jew in nazi-germany you look out the window some soilders put outher jews into a train to auschwitz. You hear that your door got opend. What exactly do you do without fleeing or physical fighting?
An individuals support of freedom and justice is not the only measure of value an individual can provide to a society. This conclusion is reached by purposefully ignoring any scientific or economic benefit a person could bring.
1. What if the battle is between two equally bad sides? There is no "good" side in most civil wars (Syria etc.) 2. Some people may view the fighting and "picking sides" as the problem in the first place. By participating you are perpetuating the problem. 3. What if you are a child, disabled etc.?
This does not have to be the status quo and most societies that openly accept refugees make at least some effort to integrate them; generally exploitation of refugees or immigrants occurs only when there is a strong feeling of resentment towards them, as in the United States.