People have countless reasons for using drugs. I, myself, am a drug user. I have also been a front-line worker for more than a decade, providing harm reduction and street outreach. I come from a good family. The first time I tried drugs was in college. I started using for certain reasons and I still do. Through my work, I've met people who began using after having an accident, for example.
A lot of drug users go to the hospital because they're experiencing pain, but they don't receive the treatment they need to deal with that pain once the physician finds out they have been prescribed painkillers or have used drugs in the past. They aren't going to the hospital for detox treatment; they are going to have an urgent health issue looked after. People in those circumstances tend to turn to the black market for substances that help them feel better, so they can keep working and contributing to society.