Catching the disease causes a very similar immune response to having the vaccine - the vaccine does not produce a life-long immunity either.
I realise that, but sometimes it is thought catching a disease naturally gives a lifelong immunity and I was just pointing out that that is not always the case.