There is no good decision here, the alternative, refusing on medical ground is not correct either. There is no medical ground to refuse the guy some weed, when it is perfectly legal for him to buy unlimited quantities of alcohol which, medically, is as bad or worse.
In both cases, the law puts the doctor in a position where he needs to bullshit. Some will chose to ignore the global context and look at the patient request in isolation, other will do the opposite.
edit: also "pain" is intrinsically difficult metric for a doctor.
The doctors who do this (largely running a cash-only practice) are really a disgrace to the profession.
It's good to be willing to think outside the box and practice with compassion, but it's another thing entirely to create prescriptions for surreptitious indications that is motivated by personal profit.