For example: How do SSRIs work? Statistically, they do "work," for certain values of work. We know that they result in more serotonin in the synapse. But we also know that that's not the reason they work, because that happens immediately but it usually takes a few weeks for the drug to actually work. Evidently they work by inducing some kind of structural change, but nobody knows what.. Nor do we need to know what to know that they're good drugs to prescribe in certain circumstances.
Meanwhile, many people want "reassurance" to be part of the product that they receive when they go to the doctor. If your doctor said, "these pill seem to sort of go with your symptoms in the massive table I have painstakingly memorized, nobody really knows what they do, try eating them", she would be providing a strictly worse product in many people's eyes than if she said "You have condition X. It happened because of Y. Take these pills and you'll be all right."