@Pavel Suk unfortunately, there are such conditions. I am about to take the vaccinations for a job travel to West Africa and I have to sign a lot of paper and make tests to make sure, that I am not allergic or have a precondition that could make the vaccines cause severe side effects. Most prominent are immune system conditions. You dont want your immune system to be triggered by a live vaccine, when you just supress it because you carry a a donor organ(Kidneys, Liver etc).
To save people with such conditions from harm is one of the reasons to strive for vaccination of at least 95% of the populace.