Hard line policing is the problem, not MJ/opiates itself.
If you get in as much trouble doing/buying/selling/etc MJ as Fentanyl, you might as well do the latter.
If MJ is legal, many would stick to that.
Same for MJ-to-alcohol: and the alc producers know it, they lobbied fiercly against legal MJ and when it became legal (like in Canada) they were the first to invest heavily in it.