I have always thought this. It can take up to 6 months to get properly up to speed on a large project. So for those 6 months you are maybe averaging 50% productivity. That's basically 3 month salary a company is loosing by swapping staff. How many people get offered that sort of month to stay?
I worked for a major institution's engineering group where we formally asked "We're getting recruited all the time for more, will you raise comp to market to prevent people leaving?" Answer, "No." Annual attrition was 25%. At a recruiting/replacement cost of ~$40K, raises would have made more sense, but then managers would have failed to wield their power to "constrain their budget."
I turned down a job offer because it was about 10% below what I wanted. Four months later I saw the company complaining that they still hadn't filled the spot - I wonder if they think they made the right choice in refusing to negotite. (Probably they do, and they continued to do so with other candidates).
I keep seeing the same ad for a job that I was contacted about a few months back. I refused to do their hour and a half hacker rank challenge on the basis that is nothing like how I work on a day to day basis, and I have examples of real work online if they need to see that I can code.