I don't really think any justice system is actually putting rehabilitation first. Otherwise, you'd be sentenced to "until you get rehabilitated or no more than X years."
I don't think that example you gave is a flaw in the logic. We don't know when people are rehabilitated, and there's reasons for having minimum sentences, whether you agree with them or not.
The greater issue in my opinion is that we do a bunch of stuff to create this illusion of safety for the public (and businesses), and we're not willing to budge to give people a chance. We very reluctantly pass laws that clear some peoples records if they're young enough and haven't done anything so terrible... and that's if you're lucky.
Disenfranchisement should be an exception for people that are likely highly-dysfunctional, not a general purpose solution. A new despised underclass to place a substantial percentage of the population. Seems dystopian to me.
Here's a thought: Why do we permit private companies to not hire ex-cons? Why do you just get to decide that you don't want to hold up your civic responsibilities like that? Who wants to work with someone that used to be violent maniac, sleazy thief, or worse?
I agree about cost cutting measures and the criminal justice industrial complex. Still we have bigger issues around crime and reconciliation that prevent us from making progress. To be honest, I have trouble understanding how we're going to change, unless the average person can live with someone ruining their life, then spending "only" a year or so in prison and moving on to be successful in a decent paying job.
We still find that outrageous in the US, and it's going to be very tough to make progress that way. It's not about making something "a goal", especially in a country like the US, it's about convincing the wealthy and powerful class to do anything at all about it and stop making it worse.