A couple thoughts to put a different perspective out there:
Sometimes they do
There ARE companies out there who pay top performers incentives in the hopes of keeping them around. Sometimes it's just making sure that top performers get great raises, sometimes it's bonuses and payoffs specifically tied to staying at the company. Sometimes it's things like stock options or grants that vest over a certain time period.
I've worked in companies where management took an active part in figuring out who their "cannot afford to lose" individuals were and making sure they were on a plan like this.
I've also seen cases where plans like these are not common knowledge. They aren't advertised the way incentive plans might be. I've always had a quandary on that - since knowing that good benefits are out there if you rock seems like a good thing to communicate. I can only assume that some of it is that there are cases where the company doesn't exactly want to tell everyone else that they are expendable.
Pay is a competitive game
Money is the biggest thing that is an inverse tradeoff. If I give you money, that is money I don't have. Other negotiations can boil down to a win-win where we each give up stuff that we want less than the stuff we're getting, but money is a zero sum game.
That makes the process of figuring out how much to pay employees something of an art form - certainly there's a minimum that is a basic standard of living but with people who have highly marketable skills, the goal is to pay salary that is just high enough that you can recruit just enough decent talent to be able to get the work of the company done. Pay more than is necessary for that goal, and the company will spend money on an unnecessary expense.
A company can look at industry baselines (same as employees, or possibly better pay-for research) - but there's not perfect science here. A reasonable company will keep an eye on the bottom line and try to keep average salaries somewhere in the spectrum of typical pay for that pay grade, but there's always hard to calibrate differences - for example, a company near great commuter options may be able to pay less than a company out in the middle of nowhere. Or a company with a great reputation for training and skills may be able to pay less than a company known for working it's people into the ground.
An employee announcing that they are leaving (especially if the reason mentioned has anything to do with salary), is a great opportunity for a company to see if modifying this vector just a bit will help. Changing the pay incentives of a single employee is a WHOLE lot cheaper than giving everyone a similar percentage increase in the hopes of retaining the percentage of people who would quit if such an increase was not available.
In the end, pay is often NOT the reason people leave
In my experience, it actually takes some pretty egregious pay shortfalls for lack of salary to be the BIG reason people leave. Even if pay is on the lower end of what's reasonable in the location, skill set, industry - people will stick with a job that they basically like (or don't hate). The comfort of known coworkers, decent bosses, well-understood work, a known commuting route, or other decent enough patterns can be enough to keep a person working in an environment so long as they see options for future career success and some level of long term company viability.
When these things change - for example, when a company has financial hardship, or the management changes so that the culture is no longer so tolerable, then many people will leave regardless of the amount of money available. In these circumstances, increasing salaries across the board by 10% is likely NOT going to retain enough people to make the extra expenditure worth the cost.