Yes.
The purpose of punishment is to "teach", one way or another, the other to behave like you want, or the group wants. Human children are treated exactly the same as any animals pups, cubs, or whatever would be. They are taught their morals and how to behave.
Naturally, the same also applies to those that are adults, it is just mostly harder to convince them of taking a different standpoint.