Immunization does not involve injecting the patient with an active virus, but rather with an inactive virus that are not infectious.  Immunizations reduce the likelihood of infection.  For an entire population, there are some (such as infants and those who might be allergic to the serum in the immunizations) that cannot be immunized.  Getting immunized helps protect this vulnerable population.