Why are exams needed for vaccinations?

Why are exams needed for vaccinations?