Hiring people is very expensive. Finding and qualifying leads, creating job description, interviewing, on boarding, orientation, training, introduction to and getting familiar with the existing code base. Firing requires distributing that team member's work to other team members.
This can take months and a big investment from existing team members, to go from wanting to hire someone to a fully productive team member. And that's assuming your hiring process never accidentally hires someone even more incompetent than your "poor" team members.
Compare that to investing in improving existing team members to help them improve. Is that really more expensive than hiring and firing?
Also accidentally hiring the wrong people can be devastating. It's better to identify and get rid of bad hires right away.
"The average great software developer will apply for, total, maybe, four jobs in their entire career."
You say that like it's some sort of epiphany, but do you honestly believe that there's anybody who wasn't trying to hire better people in the first place? If the problem is the quality of the people you've been hiring, maybe your boss should consider replacing you with somebody who's better at finding better people to hire, eh?