This. If https://insights.stackoverflow.com/survey/2018/#work-how-do-... is to be believed, compensation and benefits are the most important thing to most programmers. But it's not the only thing, and my guess is that beyond some "good enough" level, other factors become more important.
Imagine you were hired at a company, trained and mentored in a whole new skill set, given work you enjoy and find meaningful, working with people who encourage your further development, and were shown appreciation for your efforts and abilities.
Would you leave at the first opportunity to get a raise? Unless I really needed the money or was severely underpaid, I probably wouldn't.