Earlier quoted context omitted.
But while they are getting guidance and mentorship, they are not being a productive member of the team, taking time away from experienced developers and as soon as they level up they will change companies and the next company didn’t have to invest training time. I know everyone has to start somewhere but from the company’s perspective, hiring a junior developer doesn’t make sense.
Another perspective to consider as well: while you are spending the time investing into and training people who needs the training and investment, your competitors are throwing money luring away the ones you have already trained, and leaving you in the dust in terms of velocity. Turtles all the way down. Once a game shifts into zero-sum, it's not gonna stop getting played until it collapses. Normally, I would say to…
That is a zero-sum attitude that does not hold up when a company does other things well. If you are training your employees, you are likely to be doing the other things that help retain employees (https://www.bayshorestaffing.com/images/uploads/Blog_Image.j...). And if you are focusing on and actually delivering all ten of those benefits, employees are extremely unlikely to be jumping ship unless they are either a poor employee or have poor character (which you don’t want anyhow), or the competition is paying not only well above market rate, but well above your rates. Which means that they are now at a strategic disadvantage because an inordinate amount of funding needs to be diverted to payroll - much more so than in a company like yours.
Any company can make an end run around zero-sum thinking by fully and honestly employing those ten benefits. Employees can and will rise to the occasion, bringing a competitive advantage to your company that is well in excess to their numbers.