Why should parents have a higher degree of rights over the rearing of a child than someone else? Simple: they have willingly engaged and committed to that child's development. They are invested, as it were. Why should a politician pay more attention to the voters that elect him/her than to humans in a different country on a different continent?
We put restrictions on parents for the same reason we put restrictions on political processes. Ideally, everyone would work for the best outcome, but in reality people make mistakes. Sometimes they even willingly do things wrong. Thus we have society which attempts to maximize the good of freedom while minimizing the evil of abuse.
Society says that parents can't randomly cut off a kids toe because that is (almost) never something that should happen. It is a very clear cut issue. But educating children is good; the problem comes in how people educate their children. Lord J Esq, you bristle at parents taking their children to Church. Pfft, you should be glad! There is little like being raised complacently in a religion to strip the meaning and passion out of that religion. And those backwater churches; if the kid goes on to college and gets exposed to new ideas, that very act (regardless of what those ideas are) will challenge all pre-established beliefs. You should be far more concerned with the home environment of children. Children definitely parrot the beliefs of their parents. A child in an ultraconservative family who happens to not regularly attend church will be far more "damaged" than a child in a liberal family who regularly does attend a religious institution.
Since individual context can play such an important role in education (and sure, indoctrination; it would be dishonest to say that any parent does not indoctrinate their child), society generally perceives that the limitations on freedom that effective social interference would necessitates are not compensated by the benefits.
Cut off a kids toe and we'll cart you away. Force your kid to wear tassels on all their clothing… meh, that is on a different level all together. We can largely agree that the former is bad, but society is fairly divided as to the latter.