The counter to this is that many people aren't motivated by money, but need to actually make sure the job offers enough money. "Does the salary range enter into what I need for my life" is the question, not "what job ad has the maximum possible salary". A checkbox, not a parameter that needs to be globally maximal
This is what I've been told but it looks like all the other responses to my comment are arguing this isn't really true and people will switch jobs to a higher paying one even if both provide sufficient income to live off.
It probably depends on how much more the other job is paying.
For example, I would ignore a 10% raise; my reaction to 20% raise would depend on whether I like my current job; and a 50% would certainly be a strong temptation, unless it is a kind of job that predictably sucks.
The companies that complain that they cannot find a senior developer, they usually do not offer 50% more; or if they do, they carefully hide the fact from the unsuspecting audience. It is their choice, of course. I am just saying that it indeed is their choice.