One area I've studied pretty extensively is the history of cancer treatment. In the long story of the history of cancer treatment, it is absolutely scandalous how often the scientific consensus was wrong and persisted for years in spite of the evidence. For example, the radical mastectomy for the treatment of breast cancer continued to be used for many years, leaving many women disfigured, in spite of wide evidence that it did not produce better outcomes vs more restrained breast tissue removal.
In the history of science, many of these kinds of bad ideas have persisted simply due to deference/seniority - the incentives are all stacked towards paying your dues and not challenging the status quo and absolutely not towards being right/following the actual scientific method. There is a reason the saying "Science advances one funeral at a time" exists - as Max Planck noted: "a new scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents die, and a new generation grows up that is familiar with it.”