If you give a dog timely and consistent corrections, it really does learn. That's literally half the battle in house-training a dog. (Yes, you try to control and arrange success and praise when the dog does the right thing, but you also correct when it does the wrong thing.)
Positive-punishment reinforcement has shown to be less effective and more time consuming than positive-reinforcement training time and time again in dogs.
Humans might learn from positive punishment and deterrence, dogs are less good at it.