
Sildenafil, better known by the brand name Viagra, wasn't originally designed to treat erectile dysfunction. Pfizer researchers were testing it as a possible treatment for angina. The drug didn't work particularly well for its intended purpose. However, trial participants reported an unexpected side effect.
Pfizer quickly recognized they were sitting on a gold mine, and after further clinical testing, Viagra was approved in 1998.