When young children get things wrong, it is because they don't know better. The younger the child, the more obvious this should be. They may not grasp the cause and effect issues. They may have been curious, or bored - both of which are innocent conditions. If a small child messes up, they need educating, not punishing. 

At some point, a person becomes capable of malice and deliberate cruelty. But what if we saw this primarily as an education problem, not a reason for punishment? I have no qualms about the idea of using short, sharp interventions to reduce the amount of harm or danger in a situation, (better you do something unpleasant than they tease the dog until it bites them, for example) but on the whole, what is punishing a child really about?

Are we punishing them for not having understood why something was important? Should it be their responsibility if they haven't grasped why something matters?

Punishment has more to do with asserting authority and teaching obedience than it has to do with helping a person learn, grow and do better. Children will tend to respond to arbitrary authority either by increasing their resistance to it, or by hiding better. Punishment leads to fear and/or resentment. A child who has 'learned' to behave through punishment is likely to have learned about what to hide to survive, but they won't necessarily think there's any other value in what they've learned.

I think much the same is true of adults. Punishment does not discourage people from committing crime. Education and opportunity are far more effective on this score. If people don't understand their rights and responsibilities, locking them up won't fix that. Punishment doesn't restore anything to the victim, either. It doesn't actually achieve much for anyone and it has a high financial and social cost. What punishment does allow, be that at home or in a society, is for some people to have power over other people. Punishment has much more to do with the assertion of power and the reinforcing of hierarchies than it does with solving problems or fixing behaviour.

Punishment teaches that the person with the most power in a situation can dish out punishment on their own terms. The person with the least power is the person it will be easiest to punish. The rich and powerful are often very good at avoiding punishment, while any crime punishable by a fine was only ever intended to hurt poor people. What punishment leads to is the understanding that having power is more important than being right, or good. This does nothing to tackle crimes motivated by desperation. It also fuels the kind of crime that is driven by the desire to have power over others.