If you think people nowadays do unusual things, you should check out our comparatively recent history. You’ll see that our ancestors used to do even weirder things. But their actions were actually legal.
100 years ago, people didn’t treat this substance as harmful. On the contrary, it was available in drugstores and sold without a prescription to heal coughs and toothache. Cocaine was also recommended as a sedative for kids. And, as with other pharmaceutical drugs, cocaine was widely advertised.