For one thing, Viagra doesn't work for everyone. For instance, for those who've had prostate surgery, the drug helps some people while it doesn't help others. People with diabetes or circulatory problems report similar results. It works wonders for some and doesn't do much for others.
Even for those who it does help, a strong erection isn't always enough. If there are problems in a marriage, the mere ability to get hard won't solve them. For some older couples, the wife may have lost interest in sex long ago; the husband's new-found vigor might not find a willing participant. Another concern is that sometimes men go overboard with their new-found virility and start engaging as sex as more sport than loving communication.
Viagra is only one part of the puzzle. It works on the plumbing, but doesn't work on the other parts of a relationship. That's not to downplay its effectiveness or it miraculous potential; for many people it truly is a wonder drug. For others, though, a realistic attitude towards its strengths and weaknesses will result in a happier outcome for everyone involved.