Medical school is still rooted in the 1950s in a lot of ways, with an emphasis on memorization which is just patently ridiculous in an age of smartphones and search engines (not even factoring in the advent of LLMs). Residency involves working shifts that are best described as absolutely insane, in an environment that would be stressful enough as a five-hour shift, for little pay and even less prestige.
Doctors should absolutely be able to handle stress, and I can appreciate some amount of "hell week" ritual to make sure all graduates are battle-hardened, but all reports I've seen indicate that the current state of affairs has way too much fire in the trial-by-fire, and the trial itself dwindles on way past the point of any benefit.
It ends up producing doctors who are very, very good at doing a lot of busywork on deadline and getting yelled at, but aren't always the greatest at human intuition or thinking outside the flowchart, which is often to the detriment of patients.