They take it because they are addicted. Many become addicted from recreational use, but many others become addicted from using prescription pain killers for chronic pain. When they can no longer get any or enough from their doctor they look elsewhere. Going to multiple doctors used to be one way (ask Rush Limbaugh) which is one of the reasons the DEA made it harder for MDs to prescribe them, whether for legitimate needs or not. But my point is even “cheap” heroin is more expensive that prescription pain killers.
I have personally only known seven heroin addicts in my life. All young people. Three dead now. All of them got into heroin for “fun” and not to ease chronic pain.
Regardless, it is a tragic path.