Can doctors do that?
Cocaine and opium were used a lot. In fact a lot of drug addiction to those in this country apparently started with women in WW1 being given "calm pills" to help with Air Raid shock that had all sorts of things in them.
Drug prohibition only really became a thing when racist Americans wanted to get blacks and hispanics out of their area, hence all the "Reefer Madness" videos and the like. Then America used it's trade power to force every other country to follow suit. There's a fascinating documentary on it. The cotton industry were heavily involved as hemp was a big competitor.
Basically, drugs are legal or illegal for political reasons rather than moral or health ones.
Before you say you're "high on life", make sure you're caffeine, sugar and alcohol free as they are just as addictive and can be just as dangerous. Or maybe save the moral high horse completely.