Drug prohibition is the lead cause. Doctors realized that hey, physical dependence on opioids isn't really medically dangerous in a supervised setting with regulated quality products, so maybe people in chronic pain shouldn't have to live in agony until they off themselves just to avoid it. Then a small percentage of people started using them for pleasure and selling them to other people, so the DEA and police decided their medical expertise should supersede doctors and medical boards, because prohibition has always worked so well in the past. So then a whole bunch of people couldn't get enough, or couldn't get any, relief from their doctors, because the doctors were scared of being arrested like so many of their colleagues, just for not practicing medicine according to the local drug cops rules. So, whether it was for pain relief or for pleasure, lots of people realized heroin ain't all that different, so in a move that shocked no one except drug warriors, lots of people went from getting their opiates in a medical setting from doctors and pharmacies, where treatment and safe products were readily available, to street heroin, which had no purity control or dosage information, supplied by criminals and used to fund violent gangs and cartels, and not covered by their insurance making other crimes to pay for things attractive. That this increased the net harm to everyone from the user to society is completely incomprehensible to people, who think addiction=bad, therefore prohibition=only option, an epic non-sequitur embraced even by most people who've realized that it doesn't work with marijuana, but since heroin is REALLY bad, now it magically will work if only we increase sentences and make pain patients suffer so much they kill themselves.