The software industry has a turnover problem. The general consensus is that it takes around 6-12 months to fully onboard a new hire. Essentially, you hire someone for 100k a year. Then it takes roughly 6-12 months before that person starts producing work at the 100k level. This would be fine if Software Engineers did not change jobs frequently, but we tend to switch jobs every 1-3 years for higher pay.
Let us consider the case of a company with a complex project and slightly high turnover. They need a full 12 months to onboard a new engineer and they can expect that engineer to stay at the company for 2 years in total. If onboarding proceeds linearly that company ends up paying 2 years pay for 1.5 years worth of results. The company is spending 25% of salary on training for the lifetime of that employee.
If the company managed to get the average lifetime per employee up to 3 years they would spend 3 years pay on 2.5 years of work or roughly 17% of salary on training.
A company in this situation could afford to give an 8% raise if it kept an employee around for an additional year.