Cost of turnover for companies

I’ve read many times on this board that the best way to get a pay increase in this industry is to offer your services to other companies and try the market. I’ve also heard from many managers that turnover is a substantial cost to every company. The effort and cost of hiring, training and supervising new personnel cannot be underestimated. If that is true, then why do so many companies play hard ball with the employees that they have taken so long to develop. Is a 5 or 10% pay increase worth starting all over again with a new employee?