Hey Or, thanks for sharing your thoughts! I've never worked at a company that hasn't struggled with retention and/or used a bunch of short-term contractors, so it's great if there are companies out there that care about retention.
It's extremely rare for junior devs to get promotions or raises, just as it's rare for tech companies to hire junior devs in the first place.
In general, US companies won't give raises other than occasional inflation "cost of living" adjustments. The only raise I've ever gotten as a dev (actually in any full-time position in my entire career) was a 7% raise several months after a promotion.
In comparison, I've increased my dev salary by 10-15% or more several times by leaving for other companies. It's just how it works: devs who are (or become) good enough to get paid more can't expect their current companies to pay them market salaries.
You've identified the correct solution to the tragedy of the commons: 1) hire junior devs, 2) train them, and 3) promote them and give them raises.
However, the companies are just acting in their rationale best interest according to their profit motivation.
A junior dev producing 1x the work for $100,000 is a worse use of capital investment than a senior dev producing 2x the work for $150,000, let alone a principal engineer producing 3x the work for $200,000.