The "crime and punishment" system used to raise children doesn't teach right from wrong. It teaches conformity
It says "do what you are told or there will be consequences" instead of "do what is right because you know it's right." Humans are too unique for conformity to work. We're not meant to be domesticated by insane amounts of rules and regulations; we're meant to be free. Your violence against your child is literally breaking down their free spirit. It certainly does work as intended, though. You want the child to follow rules even though they don't believe in them. Hurting them for disobedience is going to achieve that. It just comes with the ultimate consequence of turning them into an anxious, fearful, beaten shell of what they could have been.