wrote a dense book which touches on this subject (Discipline and Punish
The difference, he might argue, is that the key part of a public caning, for instance, is public. The "criminal" and the audience participate (willingly or unwillingly) in acknowledgement of the crime. This contrasts with the modern American system of justice, where criminals are fined or imprisoned and the whole thing is a largely private affair.
I believe there's a fairly large component of emotional expediency in corporal punishment. We've been hurt, directly, indirectly, or collectively, and we want to hurt back.
In my opinion no system of justice in the world, from the amputators in Saudi Arabia to the caners in Singapore to the "hard time" Americans, holds much water morally or practically. They are not likely to "reform" or "help" anyone. The fact remains that these are the best approaches our respective societies are capable of...