You've expressed these notions before in other contexts.
They do, eventually, get out of prison and, as things currently stand, almost no rehabilitation occurs in our prisons. So, they're rehabilitating in "our communities" however you want to slice it. And they are also rehabilitating from the damage that prison does to them, including likely being unable to support themselves.
Do you favor life sentences or the death penalty for all crimes where you don't want people "rehabilitating in the community"?
Also, the latest figures show that non-contact sex offenders have among the lowest recidivism rates of criminals, despite a post-conviction regime that is virtually designed to imprison them again for technical (non-sexual, non-criminal) probation violations.
Also, one of the things that is most disgusting about the criminal regime at the federal level is that it was entirely implemented by Congress and the US Sentencing Commission has almost no role in establishing sentencing guidelines. And one of the major pieces of legislation in the area is named after a D-list celebrity.
Performative work by Congress in a moral panic at its finest.