It was a good idea, too. The only problem, however, was that some unscrupulous doctors saw this not as an opportunity to strengthen the herd, but as a way to make some major bank by selling medical exemptions to anyone who wanted one. This of course drew anti-vaxxers like a drop of blood draws mosquitoes (rather appropriately).
Of course, the state wasn't totally stupid. When medical exemptions were given, it was required to list the specific medical complaint which prevented the relevant child from being vaccinated. Except the shady doctors found a brilliant lazy workaround: they just wrote any old bullshit. They knew that no-one would check, which led to some kids being exempted from their vaccinations for nonsense reasons such as having allergies or broken bones.
On its own, this would be dickish enough. Some doctors, however, managed to supercharge this grift. Instead of giving the parent a childhood-long exemption certificate, they would hand over an exemption certificate that was only valid for a few months. Why? Because that way, the parent had to come back and pay for another, and another, and ...
When we say that this scam brings in major bank, we mean it. In anti-vaxxer communities, lists of doctors who provide no questions asked, don't give a shit medical exemption certificates are hot currency. And even if a parent can't obtain one, all they have to do is search the internet for a few minutes and they'll run into doctors openly-advertising themselves as being down with the sickness.
This isn't to say that all doctors are like this. The vast, VAST majority are decent people who listened during class and aren't willing to wipe their ass with the Hippocratic Oath for a few pieces of silver 'cross their palm. Which, of course, means that they have to do their jobs with a massive target on their backs, because ...