Everybody who had been involved in founding modern civilization disagrees with you.
(Since you didn't give any arguments, I guess I don't need to do that either, but it's still true.)
You will probably totally destroy me in any argument, but: I wouldn't say they are correct in their assumptions that punishment=teaching, as crime rates are steadily increasing every year, with more and more repeat offenders. Obviously they are socio-economic reasons and factors in this, but it still stands to reason that the penal system does not work very well. I am not saying I have a better system, but it still doesn't work very well.
Punishment is usually used as a deterrent rather than rehabilitation, with regards to prison. More people are deterred by jail or the prospect of returning to jail than are "fixed" by the system.