Some managers, mentors or such seem to deal with this well. But, in the cases that I've seen having an employee that is not producing value is stressful and time consuming. Largely, it's driven by empathy. You don't want them to get fired, or embarrassed.
Anyway, the person taking up most mentoring time (including:'leave this part, I'll fix it) is also producing the least of the least important stuff. The best juniors can be left to their devices and everything is ok, but basically the time and effort allocation becomes very inefficient.
Mentoring is important, but I disagree with you somewhat. Software is just an ADD industry. Everything is fast. You hire for needs in the next 12 months. Junior devs (all devs, some places) average short stints.
Anyway, mentiring, training and such are long term investments. Makes less sense in industry segments that think in shorter horizons and treat everything from office space to employees or even products as 1-2 year solutions. Entire companies are built around 3-6 year horizons from cenception to exit.
I see this as a byproduct of product development time. MVP and its associated stuff... It's all about short horizons, clean slates and short term planning. Nothing is free and the cost of this is anything that's part of long term strategy, like hiring and training for long term benefit.