What are second and third doses of vaccines for? Why can't the whole dose be administered at once?

Priming the pump. For some diseases (smallpox) a single vaccine dose given to someone with a mature immune system confers lifelong immunity. For infants with a new immune system, and for many bacterial diseases (pertussis,tetanus) the protection is transient and boosters must be given.When perfecting a new vaccine, they must gather data to see which ones need boosters or not.It varies,depending on the immune system.