Viagra history is pretty well known.
An interesting tidbit is Pfizer originally intended to inhibit Viagra's target, an enzyme called PDE V, in the kidney as a means to reduce blood pressure. They were fairly into the project before someone checked and discovered there is no PDE V in the kidney! You'd think one of the world's largest pharmaceutical companies would do the due diligence before they started ... They then shifted to PDE V inhibition in the heart, and that was the intention when they started clinical trials. The scientists were aware that erections could be a side effect and when this was uncovered had to persuade management it was a worthwhile cause.