There are certainly other causes of addiction, but at the end of the day a lot of rehab programs fail because even if the addict gets clean, they're immediately sent back to the living situation that got them addicted in the first place. This is especially true for the homeless, "congrats you're free of heroin, now go back to your tent under the bridge where you live in constant fear of rape from other drugged-out homeless people and no employer will touch you! You're free!"