I agree with this so much. What we're currently doing -- in Canada too -- doesn't make sense. We send criminals back into the community the same or worse than when they went to prison. Then they commit more crimes, often damaging their communities, families and others in the process, leading to more people to commit crimes and end up in jail. We spend the least amount possible on our justice system -- even though it's still a crazy amount -- because tax payers don't think it's "fair" to offer criminals free counselling, education, etc. But if we invested in really rehabilitating people like you said, we'd all be better off. We'd have a better shot at ending the cycle of violence and, long-term, our costs would go down.
I am 100% in favour of investing in rehabilitation. However, I also think that those who can't be rehabilitated-- like repeat sex offenders or people who commit violent acts against children -- should be kept away from the public indefinitely.