Corporal punishment as a form of discipline let's kids know that there are consequences for misdeeds. It is the administrator of the punishment's responsibility to explain why it's being used and ensure the recipient understands. It is the recipients responsibility to understand and show remorse.
Punishment is a balance. Both sides have to do their part or else it's a waste of time and energy.
The examples we see in public everyday are nonsensical. Parent's claim it's discipline, but it's closer to child abuse. It's lazy parenting. It's leaving the house without a plan and assuming the kids are mindreaders and onboard with the parents' objectives.
I'm all for it, but I've never used it. I've never had to. I've always explained my objectives to my kids and what their part is in that plan. If they have objections, then they're addressed before hand and compromises and changes are made if they apply. If they don't, they have to grin and bear it, but with an explanation and a clear view of the objective. My kids know I have it in me to strike. I'm no angel. But I am mentally and emotionally balanced enough to have the presence of mind to know when to apply it.