People who had this mutation back in the 14th century had better chance of survival (better fitness) then people who did not have this mutation. They were majority of people who survived the Black Death because of natural selection. Their offspring inherited this mutation too, and their offspring after.
There was no natural selection for this mutation in some other parts of the world because they were not hit by the Black Death.
Since the same mutation is responsible for immunity to HIV and the Black Death, offspring of the people who have survived the Black Death are immune to HIV too. Part of the world that was hit by the Black Death, now have more people with this mutation.