Sometimes they are. It still isn't indefinite and if they (or society as a whole) don't address the underlying issues then they will reoffend.
We only sentence people for offences that they are actually convicted of though, rather than what we think they might have done.
Repeat offending is one of those things that seems easy to fix, but it actually isn't. If someone is offending because of addiction (for example) then no jail term is really going to fix that unless they get clean. That isn't to suggest that we don't jail them, of course we do and we should, but jail alone won't magically fix anything.
I had a client years ago, chronic addiction issues. I still see her name in the paper periodically though I haven't acted for her in ages. It is mainly public order matters and shoplifting. She shoplifts to get drugs, and then she is angry and out of control and gets arrested for public order stuff. She has had her kids taken off her, she had gotten a number of bad beatings (presumably for drug debts). She has been jailed for long stints (given that these are small offences). None of it is going to change until she gets clean. Now, you might argue "lock her up for 5 years" but firstly, the judges don't have the authority to do that for the offences she is accused of and secondly, we don't have the jail spaces to lock up those sorts of offenders for years on end.