"[Paper mills] sell these papers to e.g. medical doctors in China who need to have a scientific paper published in an international journal in order to get their MD, but who do not have any time in their educational program to actually do research."
It's a typical case of unintended consequences. It probably seemed like a good idea to require prospective MDs to publish a paper in a scientific journal, but if the medical students don't have time to do the research, what are they supposed to do? Pay others to do the research for them? Maybe some believed that's what they did?
See also: The Cobra Effect, Mechanism Design
The article talks about the students not having time to conduct research. But being given a job and not enough time or money to do everything in the most desirable fashion is a widespread management style in both academia and business. There have been articles about medical students in the US not getting any sleep.
Those two things by themselves would not raise eyebrows in the US.
Where I went to grad school long ago, the psychology grad students had to publish a research paper en route to getting a clinical degree. They had a phrase, "published and outa here." I have no idea the quality of the work that got published, but the behavioral sciences are sitting on a "replication crisis" today, that predates China growing exponentially into the research space.
So I don't think it's a China problem.