The pendulum swings. In the old days, if you showed up at a doctor complaining of erectile dysfunction, likely as not they'd recommend you seek therapy for your Oedipal complex. There wasn't a treatment for the physical, so they had no choice but to look to the psychological.
These days, when popping a pill appears to cure *everybody* of erectile dysfunction, the assumption is that it's all physiology. If you have trouble with an erection, the root cause must be something wrong with your plumbing. Treatment for the physical works, so there's no reason to consider anything psychological.
In some cases, it's almost certainly true that it's mainly about physiology. Diabetes, high blood pressure, and the medications people take can cause erectile problems. Simply getting older can have a similar effect.
It's important to remember, though, that psychology often plays a part, both in the problem, and how Viagra can help with the solution. Confidence counts, and Viagra lets people relax, giving them the confidence that they will be able to achieve an erection.
Sex and relationshps are complex. The problems that arise are not simple. Viagra doesn't solve everything, it only puts one missing piece of the puzzle back in place. That's an important piece, to be sure, but for a lot of couples, there's more work to be done beyond that.