Hospital refusing unvaccinated pregnancy. Is this fair?

A hospital in South Korea has refused a birth with C-Section as it is considered "surgical/cosmetic" and my friends are not vaxxed. They are saying that the mother can get vaxxed but she is already 8.5 months pregnant. Is this justified and safe?