This sounded wrong, so I did some googling and found this criticism of the study that first popularized your stat. Sounds like its a case of poor extrapolation from a biased sample:
"After adding that this extrapolation was surely an underestimation of the actual problem, they concluded that this would mean medical error would rank third in the Centers for Disease Control’s list of causes of death in the U.S. This became the title of their published analysis, which has been cited in at least 1,265 papers according to Scopus, and this memorable idea spread to news articles, television shows, and alternative medicine circles.
Critics of this analysis have pointed out many flaws. It is based on studies whose data was never meant to be generalized to the entire U.S. hospitalized population. For example, one of these studies, by the Office of the Inspector General of the U.S. Department of Health and Human Services, was conducted in beneficiaries of Medicare, who are aged 65 or older, have disabilities or have end-stage renal disease which requires dialysis or transplant. The study authors counted the number of deaths in their sample to which they believed medical errors had contributed, and this number was then used in the BMJ analysis to extrapolate to all U.S. hospitalizations. However, this makes the mistake of extrapolating an observation found in one sample to a different type of population. Case in point: if we look at everyone hospitalized in the United States, one patient out of ten is there to deliver a baby. Taking death statistics from a sample of Medicare patients and extrapolating it to all hospitalized patients is like turning apples into oranges, to adapt a popular saying to the current situation."
That quip is less deep and more complex than you think.
Look back to when the leading cause of death was "any slight infection" closely followed by any number of other accidents and diseases.
Health, saftey, and treatment have now become so effective that death is relatively a great deal rarer in developed countries not at war to the point where people have an expectation of friends and relatives being kept alive and strong tendency to sue when that doesn't happen; leading to many "malpractice" cases being settled and covered by insurance.
Would you rather live in a world with or without modern medicine and doctors?
You're lazily creating a false dichotomy to try to make the current US medical system seem better by comparing it to something objectively horrible. Compare it to an equally developed country that exists today and yes I would rather live in a modern country without AMA trained doctors, without perverse billing incentives, and without unnecessarily complex administration gatekeeping access to effective and timely medical treatment which frequently leads to reduced quality and length of life.