The best rehabilitations happened in the prison farms that used to be until our 'liberal' governments closed them down.
Those prisons were self-supporting; they taught inmates trades, everything from farming to carpentry, barbering, mechanics and much more. The prisoners were busy, productive and learned to take pride in their accomplishments.
But then the governments shut them down. Couldn't expect the poor prisoners to actually work and learn, could they? Now prisoners have nothing to do but share ideas on how to commit their crimes more effectively and furtively.
The cat o' nine was also quite effective. One application of that was more than enough to 'rehabilitate' a good many criminals! But cruel and unusual punishment is okay for victims, it seems, but not okay for those who victimize.
Again, your wisdom knows no bounds!
Well, except for the ones who died under the lash. Read "The Fatal Shore" for an account of the salutary benefits of the lash.
It is, however, a terrific terrorism tactic. Ask any Southerner. Or any torturer. Which is apparently what you want from the Canadian government.
Violating someone's physical integrity is the ultimate violation. That's why it's a crime in every possible form. And it doesn't cure them. It makes 'em mean.
We have to keep in mind there are some offenders where "talking" to them just doesn't work and they need something that has more persuasion power.