The difference here is it's not themselves the parents are putting in danger, it's their children and other people around them.
Not vaccinating your kid isn't really child abuse or negligence and other kids aren't your responsibility.
You don't have the right to voluntarily allow your child to contract diseases and spread them to other people's children. The right for you to swing your fist ends at the tip of my nose, bitch.
The difference is, accidentally punching someone isn't illegal unless you cause damage. If your unvaccinated kid intentionally infects another kid then your kid has assaulted them which is a totally different crime. If your unvaccinated kid unintentionally infects another kid who sustains damage from the infection, you are technically culpable for that damage. In reality it'd be impossible to police because there's no way to track the vector of infection, but that's not a reason to make it illegal.
The difference between this and seatbelt laws is that violating a seatbelt law is only harmful to the idiot who disobeys it. If your kid is unvaccinated and gets sick, it's entirely possible he'll spread it to someone who couldn't get vaccinated because of legitimate health reasons.
Sucks for them? It's not Kid A's responsibility to keep kid B healthy. If Kid B has Lupus and Kid A accidentally gives him the flu that's really Kid B's problem not Kid A's.