Spending five times as long to hire a senior who doesn't leave in a year or two is then a much better situation.
A junior dev hire involves sifting through many resumes, and then interviews, onboarding, and then three to six months of lower productivity for the mentor.
All of that represents losses against the current status quo. The current status quo is predictable.
This completely discounts the "accept and renege" that also is common with juniors looking for a job which can reset the job search back to square one even when you do find a good candidate.
Taking six months or a year to hire a senior has fewer resumes to sort and fewer interviews to conduct. When the person is hired, they've got a much shorter onboarding and has the necessary skills to be able to become familiar with the codebase without causing a hit to the productivity of the rest of the team (or other seniors).
In this situation, hiring a senior is likely a much better outcome with fewer seen and unforeseen negatives and an eventual positive.
Senior devs tend to be a bit more stable in terms of "looking for a place to settle down" rather than switching jobs frequently as they've got a better idea of what they want to do and how to judge if an origination is one they want to be in.
Additionally, even if it is the case that they leave in a year or two, the org has likely spent less time on going through resumes (fewer resumes applying) and overall interviewing (individual interview may be longer, but again - fewer overall being done) and less time on onboarding.
You're likely able to have productive contributions from a senior in 3 months rather than 6-12 months for a junior.
So even if the senior does leave in a year or two - the org is still better off trying to hire a senior than a junior.
---
It really boils down to "if you can't compete with big tech salaries, there likely isn't a way to hire a junior dev that will be a net positive to the organization.
A junior dev hire involves sifting through many resumes, and then interviews, onboarding, and then three to six months of lower productivity for the mentor.
All of that represents losses against the current status quo. The current status quo is predictable.
This completely discounts the "accept and renege" that also is common with juniors looking for a job which can reset the job search back to square one even when you do find a good candidate.
Taking six months or a year to hire a senior has fewer resumes to sort and fewer interviews to conduct. When the person is hired, they've got a much shorter onboarding and has the necessary skills to be able to become familiar with the codebase without causing a hit to the productivity of the rest of the team (or other seniors).
In this situation, hiring a senior is likely a much better outcome with fewer seen and unforeseen negatives and an eventual positive.