I wish the results of this study were accurate, but sadly there's a lot of issues with how it was set up. First of all, the people interviewed came from a list of medical marijuana patients. As we all kind of know, a lot of medical marijuana patients (especially in California, which has very lax regulations) don't really "need" cannabis for their conditions, and many have only applied for a rec because they like to smoke cannabis. And for a lot of those patients, they simply put down "chronic pain" as their reason despite not technically having severe enough chronic pain to get opioid painkillers. The study didn't discriminate against these users, so it's not very surprising that a bunch of cannabis fanatics supported cannabis over opioids. Leaving aside the question of how many of them have even tried opioids before, it's not clear what level of "chronic pain" they even have. From the way I've heard it described, opioid analgesics are the only drugs that can really treat sharp, acute pains successfully. In that sense, this study seemed biased from the start.
That said, cannabis still has plenty of benefits. Opioids are definitely over-prescribed in the US, and a lot of those prescriptions could be replaced with a safer, less addictive alternative (such as THC). This study definitely tells some story, just maybe not what it's intended to say.