On the other hand I know someone who died from a complication of anesthesia during an (almost certainly) unnecessary surgery.
It's a multifaceted problem.
Patients (especially the kind that present to the doctors office for a cough) tend to want doctors to do something, they don't like hearing "rest up, you'll get better on your own." Doctors provide a service, patients want to feel like their time was worth it.
At the same time doctors don't want to put themselves in a position of missing something. Everyone remembers the time the doctor missed a serious disease but since we can't have alternative timeline where the treatment and/or tests weren't done then its very difficult to say, on an individual level, what was over treatment.
Sprinkle in a healthy dose of the placebo effect stir.
Judgement gets clouded by biases on all sides.
Not only all that, but sometimes the data just isn't there on what the best course of action is. The studies haven't been done so we just do what feels "right." And we've learned that what feels right might not lead to the best outcomes.