The prescription drugs were discovered after various researches done on the human body to determine what causes the illness. It is through verifying the cause of the illness, they would study some plants or herbs with medical components that would subdue the infections causing the illness in the body.
You start messing with plants and stuff. Beating them with hammer and jamming them with powdery mess. Then put some other stuff in there just to see what would happen and it turned out to be medicine which only was prescribed to people who really need it. ;)