The whole idea of vaccines is to teach your immune system the special moves it needs to fight off measles, chicken pox, mumps, German measles and so forth, without the need for you actually to go through the disease and recovery. In the past, it used to be common to throw "pox parties" for children to catch infectious diseases at the age when they had the best chance of survival, in order not to catch it as an adult when it would be more likely fatal.
It was gambling with people's lives -- and not everyone was a winner. Next time you're passing through a cemetery, just take a look at some of the dates on the graves -- see how many children died young, even as recently as 50 years ago. The difference is modern medicine. It's not perfect, for sure, but it's still the best thing we've got.