These laws inconvenience legitimate medical use. I had a friend way back in college who had a little vial of cocaine amongst his possessions. He also had a gaping cavity in a back molar that desperately needed to get repaired but he was waiting for his student health/dental insurance to kick in. In the meantime, after meals in the mess, he’d moisten his finger, jam a little coke down the rotten tooth hole, wait for it to kick it, and then brush it out best he could. He only used that coke for the above procedure and eventually saw a dentist.
Cocaine is a local anesthetic. It is the only local anesthetic that vasoconstrictor and therefore reduces bleeding in the surgical field. Still used occasionally in ENT surgery