Some scientists were hanging out “experimenting” with substances they made (presumably huffing things and getting high?) when they apparently realized chloroform could have medical applications.
So, one of them used it on a patient a couple days later.
They claimed they had discovered this property of chloroform independently, but it had been described as an anaesthetic a couple years earlier.
Regardless, medicine in the 1800s was pretty fast and loose.