The largest meta-study to date found that among long-term opiate pain patients without a prior history of abuse, only 0.19% developed any sort of addiction or abuse.
I do agree with you that many heroin users start with prescription opiates. But the vast majority are not themselves prescribed the drug. Surveys show that they're either getting the drugs from friends or relatives or buying it from the black market.
There's no evidence that doctors are "handing out oxycodone like candy", as demonstrated by the vanishingly small addiction rate among actual pain patients. If a kid raids his grandma's medicine cabinet and steals her pain medicine, how is that an indictment of the doctor or pharmaceutical company?
[1] https://www.ncbi.nlm.nih.gov/pubmed/18489635 [2] http://sci-hub.tw/https://www.tandfonline.com/doi/abs/10.108...