This means that even at a 1% raise per year, some people will stick around for decades. One of the best developers at one of the companies I worked for was exactly that kind of person.
For the company this means a large amount of extra profit year in year out.
The odds of you saying "Nevermind, I'm out" when they don't budge from a 2% raise are from the employers side pretty low. The odds of a new hire saying "Nevermind, I'm out" when unwilling to budge on salary negotiation is a lot higher.
Hence it becomes easier to give some additional leeway in that situation. Also if companies already have a large workforce, giving a raise to all current employees is a whole lot more expensive than giving more money to all new hires.
Lastly, there has been plenty of research that has shown that salary is not that big of a predictor of whether people stick around or leave in any given year. Whether that research is also true for software developers is up for debate, but it is what most companies rely on.
Lastly an anecdote, I was told by a manager once that if I wanted to get a significant raise, I could quit and come back as a contractor or "Senior Developer" after 6 months. At that time I was considered a junior, and promotion to senior was only possible after 10 years experience internally.