Opioid pain prescriptions used to be very limited and carefully monitored because of the perceived risk of addiction. The prevailing wisdom on this danger was changed because of some low quality papers on the risk that were pushed by drug companies.
Another big driver has been a more effective opioid selling due to some Mexican drug sellers. Interestingly, these sellers are much less violent than previous opioid sellers.
These reasons are outlined in the excellent book 'Dreamland'
Long interview podcast (~1hr) with the author to listen to or read the transcript of here: