I've got no real problem with the law reflecting reality, there is no magic number where a child/young adult is mature enough to start making decisions on their own. If the parents are not able to foster a trusting open communication relationship with their teen that's on them, not the teen.
If a 12yo comes to the conclusion that this is something they want to protect themselves from and get the vaccination to me it speaks volumes about their readiness to make said decision.
Not to open a can of worms, but to me the same goes for birth control, holy shit if teen wants to protect themselves from unwanted pregnancy... here's a box of condoms and some BC pills, knock yourself out. Again if mom and dad can't proactively talk to their teens about this, it's on them, their parental failures ought not condemn their kids to STD's and unwanted pregnancies.