Yes it's a joke, but to quote some numbers in the US: something like 93% of the US graduates matched to a residency program [1], although the numbers were a lot lower for international students applying for US residency. So if you're talking about US medical students, you have to be in the bottom 10% to flunk out.
The attrition for lawyers is higher, neither has anything on PhDs where the number of "practicing" doctors drops off constantly during and after the degree, and only really levels off when O(10%) of them land faculty jobs.
[1]: https://www.ama-assn.org/medical-students/preparing-residenc...