Pure Food and Drug Act did not criminalize cannabis and heroin, it merely said products containing them needed to be labeled as such. They were still available without a prescription.
I can’t imagine how any drugs like heroin or cocaine could have been sold OTC (although they were). It just seems like something that addictive that makes you feel amazing would cause problems damn well near instantly.
In addition, the Harrison Narcotic Act of 1914 put many restrictions around them.
The Nixon Controlled Substances Act just put a federal guide posts around what was already a mish-mash of laws.