Punishment merely halts behavior, it does nothing to change it.
Remember, you do not want the child to simply stop her behavior, but to alter it. There is a difference.
Many people do believe that punishment is an appropriate and effective remedy for misbehavior, and many people do believe that God punishes human beings for not obeying his laws, and that human beings, therefore, have the moral authority and the responsibility to do the same to each other.
All of this is untrue, but your species believes many things about God and about Life that are untrue and that make it just about impossible to live together in peace and harmony.
Most of these beliefs were given to you when you were young, and many of you have passed them on to your children in precisely the same way they were passed on to you.
Schools with punitive and coercive practices have without a doubt been the primary means of transferring limited—and, therefore, inaccurate—views to your offspring, and you have actually created, on purpose, learning institutions that teach children about life from a singular and restricted point of view. Some parochial schools, yeshivas, and madrassas are prime examples of this.
A madrassa, for instance, teaches children about life in an Islamic context only. The curriculum in most such schools is almost always severely limited.