They endanger the people for whom the vaccines are not effective (its not a 100% preventative), or people who have weakened immune systems / a medical condition and thus can't have the vaccine. The non-vaccinated person becomes an extra vector for spreading the disease amongst a population.