Earlier quoted context omitted.
Prison isn't the right idea. But getting them into some sort of treatment would make sense. And that could be court mandated for repeat offenders for some crimes.
I kind of read the suggestion as a deterrent for dealers and people engaged in drug trafficking, which could lead to less addicts... Not as "jail the junkies!"
Fools that don't learn from their own mistakes are bound to never-ending cycle of repetition. Individuals or whole societies, doesn't matter.