Tadalafil (the active ingredient of Cialis) used in 5mg doses (instead of the 20mg used fo ED), was originally recomended for pulmonary arterial hypertension, latter for penile oxigenation during low-sex periods (say, you become a widower). And later still, for prostatic hyperplasia.
The good thing is that, you can be using the 5mg doses, and the days there will be "action" you can substitute your 5mg dose for a 20mg dose, easy peasy, no interactions, no different side-effects, no nothing.
So yes, like with many other drugs, they can be used/beneficial for many more conditions. And since the drugs already got approved, and have a known safety profile, discovering alternative uses is very beneficial for society. And many of these drugs, like Sildenafil and Tadalafil, have already generics available, making them cheaper to boot.