Despite the usefulness of prison in your case, there is plenty of research showing that alternative means to incarceration are better for everybody (for the offenders and the taxpayers). For example, this paper shows a drop of 40% in recidivism for electronic monitoring instead of incarceration: http://www.nber.org/papers/w15602. Also, there is a lot of evidence from drug courts. This is one example: https://crimesolutions.gov/ProgramDetails.aspx?ID=70.
I am not affiliated with Promise.
There's just very many ways that going to prison hurts a person and very few ways that helps, and only for the right kind of people too (ex: longterm drug abuser with a lack of self control relinquishing his rights in this case).
Also, there are other ways to break a cycle of addiction. Prison isn't the only way, nor even a particularly recommended way.
I'm glad you got free of your addiction. Religious types might chalk this up to "the good lord moves in mysterious ways."
But I don't see any reason why your story should be viewed as an argument against their work.
It is especially hard to think about bettering yourself and getting help when you're around countless other people basically glorifying the problem from which you suffer.
Speaking to someone who had recently been released, he talked about people shooting up in the car two minutes after being released. Friends and sometimes even family members would be there to meet them at their release and would bring along drugs for them to consume at the first possible instant as some kind of "welcome back" present.