When addicts cannot find a supply of their chosen drug, they’ll steal from anyone, even those closest to them, to fund their addiction. If they go homeless, you can’t give them money because you can’t trust that they won’t just use it to buy more drugs. This is to ignore the fact that buying most hard drugs directly funds the Mexican drug cartels and the atrocities they commit in many countries.
This is also to ignore the terrible and unrecoverable health effects that many drugs have. Have you heard of meth mouth? Meth rots your teeth no matter how much you brush them [0]. It also causes permanent brain damage but I find that the kind of people pushing to legalize meth find losing teeth to be a worse outcome.
Jail isn’t the best outcome for inmates, sure, but it’s the cheapest. If you’re a Governor of a US state and your voters see that you took money away from schools, the police, the fire department, or the roads to give to addicts instead, you’re not going to get re-elected.