Natural infection may induce stronger and longer-lasting immunity than vaccines. Whereas immunity from disease often follows a single natural infection, immunity from vaccines usually occurs only after several doses and, in some cases, can wane with time. A notable example of waning immunity occurs with the pertussis vaccine—by the time children are teenagers, they have lost the protective immunity imparted by the childhood DTaP series (it is important to understand that even natural immunity to pertussis also wanes with time). As a result, teenagers account for a large proportion of reported cases and serve as a reservoir for transmission in the community. Fortunately, there are now vaccines that can boost immunity in adolescents and adults.
There are some diseases for which vaccines are actually better at inducing immunity than natural infection. Infants who are infected with H. influenzae do not develop effective antibody responses due to an inherent maturational defect in recognizing polysaccharide antigens. Hib vaccines, on the other hand, are very effective in young infants because, in coupling the polysaccharide to proteins, they are capable of enlisting T-cell help in driving antibody production by B-cells.
The difference between vaccination and natural infection is the price paid for immunity. For chickenpox, the price paid for natural immunity might be pneumonitis, respiratory failure, encephalitis, or necrotizing fasciitis. For S. pneumoniae, it might be mental retardation from meningitis—and that would only buy you immunity to the one serotype that caused the infection. Likewise, for HPV the price might be cervical dysplasia—and if you are lucky enough to resolve the dysplasia without progression to cancer, you are left with immunity to only one HPV type (the vaccines protect against 2 of the many cancer-causing serotypes). The price of immunity to shingles is a case of shingles, and, in some cases, postherpetic neuralgia, which can be intractable. The cost of vaccine-induced protection against shingles is the cost of the vaccine, plus minor reactogenicity.
—Marshall, Gary S. “Addressing Concerns About Vaccines.” The Vaccine Handbook: A Practical Guide for Clinicians. 3rd ed. New York: Professional Communications, Inc., 2010. 209-210. Print.