Let's take this into hypotheticals - like in a Zombie movie.
There's an outbreak of a Zombie virus, but scientists have managed to find effective vaccinations against it that are being rolled out, but not everybody has had it yet. There are also very good treatments and, in any case, most people recover from it and are no longer Zombies after a fortnight of eating brains, but there are some, older, medically vulnerable or just plain unlucky people who are likely to need more intensive medical treatment or die.
There's an island where, on top of the virus, a volcano has seen fit to erupt, putting everybody at risk. You can't get everybody out at once.
Do you bundle everybody in together, knowing that this will inevitably lead to spreading the Zombie virus amongst the refugees on the ships arriving to transport them to other islands and the general, also not fully vaccinated, populations of the places that will take them? The issue with this is that everybody on the boats who hasn't been vaccinated is likely to contract the Zombie virus, so the boat companies refuse to take them, knowing that the intended destinations are also going to say 'no, we can't handle a mass outbreak'?
Or do you opt to place those unvaccinated in a relatively safe place from the volcano on the island whilst taking out those who are already vaccinated first? You then don't have to worry about those vaccinated people, as they are already on their way to safety. This enables you to then provide the opportunity for the remaining people to be vaccinated en masse.
The islands that have taken the first boatloads aren't bogged down with a Zombie outbreak affecting both refugees and the resident population. They are therefore willing and able to take further boats of people. Other places step in and say they'll take some, as it's already been seen that the refugees are not bringing the Zombie virus with them and they will be able to manage providing food and medical care for them.
If somebody on the island in the safe zone then becomes a Zombie, they're easy to spot and separate/treat (because it's not an irreversible Zombie virus) whilst others continue to get vaccinations and join the boats.
Eventually, you're left with a small number of Zombies and the volcano increasing in scale of eruption. Most of the Zombies will get better, but they need specialist care - other countries then say 'we can cope with treating a few zombies, as the refugees we've already taken haven't overwhelmed us'. Said zombies then get safely transported off the island for medical treatment.
Result: the overwhelming majority of islanders are safe, well and neither Zombies nor burned to a crisp by the volcano.
It's common sense. You get the ones out that are less of a risk, less likely to overwhelm the resources of those who don't actually have to offer help in the first place, less likely to cause the escape route to be closed off to everybody. And then you reduce the risk posed by the ones next in line. And then the next. Until everybody's out, the volcano gets to continue, all but a small number are safe.
Admittedly, I wouldn't like it much if I were currently hiding a zombie bite - but they're always the people who fuck it up for everybody else in the movies, anyway.