Experts say that Viagra was actually designed to treat angina, a heart condition, but the drug coincidently showed promise in treating impotency.
While most of the drugs are designed for a specific purpose, their potential, they say, can be discovered only when we take them.
For instance, Ventolin inhalers used for treating asthma have also been found to prevent premature labour; and arsenic, a notorious poison.
It is also making a comeback as a treatment for leukaemia.
In addition, popular impotency drug Viagra is not used for what it was originally intended.
It was originally tested as UK92480, a new treatment for angina, a heart condition that constricts the vessels that supply the heart with blood. However, the trials failed to show promise.
But later the study participants reported an unusual side effect - lots of erections.
"What was amazing about this study was that we saw a restoration of the erectile response. Now we were on to something which could only be described as special," BBC News quoted Pfizer senior scientist Chris Wayman as saying.
Similarly, Ritalin drug's potential as Attention Deficit Hyperactivity Disorder treatment was also discovered by accident.
It was originally designed 50 years ago to treat adults with depression.
Ritalin has also emerged as a cognitive enhancer, if a person without ADHD takes it, it can make them cleverer.
Prof Barbara Sahakian of Cambridge University gave healthy volunteers a dose of the drug and then asked them to perform intelligence tests.
"Not only were we able to show an improvement in their ability to do a task like spatial working memory, but the volunteers also showed an improvement with increased efficacy of the neural networks in the brain," said Sahakian.
Taking Ritalin had boosted their concentration and cognition.