Some countries with publicly funded healthcare make immigration much more difficult if you have an expensive health condition. This is the case for Canada for example [1].
[1] https://www.canada.ca/en/immigration-refugees-citizenship/se...
This is why people need to think about these things when they are in full health.