They say it does not teach what to do, only what not to do. It may work for a short time, but unwanted behavior re-emerges. When a teacher yells or hits, then the child is taught that yelling or hitting is an acceptable reaction to an event. Basic learning comes from imitation. A child often learns only not to do the behavior when the punishing person is present.
Punishment can act as a reward.
Some children may enjoy seeing an adult get upset and lose control. Challenging behaviors frequently become worse. Children can become more aggressive, withdraw, redirect their frustration and strike out at others, or escape the setting to avoid punishment. Children who receive aversive conditioning may learn to fear or dislike the person applying the punishment. They also may dislike the setting, objects, and events associated with the punishment.