It's not so much that patients recommend particular medications to their physicians, but rather that patients aren't even aware that a medication is available to treat their condition. So the ads build awareness and prompt patients to schedule appointments to ask about treating that condition, and then the physician might prescribe that medication if the patient meets the criteria. The hit rate on this is high enough to make prescription drug advertising highly profitable for drug companies. Whether it produces a net improvement in public health is another question.