There are a lot of reasons for this — one is that there is a bias towards getting significant results, and getting work published, so every researcher has an incentive to tweak things here and there, adding participants, throwing in control variables, playing with different models, etc, to get results over the significance threshold. This was considered a totally acceptable practice for a long time, but it also wasn’t reported in the journals themselves, so it was hard to suss out.
Another reason for this problem is that medical doctors do not get enough research methods / stats / philosophy of science training. In fact, a lot of times medical doctors seek out psychologists or statisticians to help them analyze their data or make sense of issues in their studies, because our training in those subjects can often be more rigorous. Some research suggests that many doctors don’t even know how to accurately report the results of a lab test to a patient — they misunderstand what the false positive/false negative rate is, and what its implications are, for example.