It's not smart business. It's often much more damaging to a company's bottom line to lose a strong performer and have to replace them than it is to pay them what they're worth. It's also damaging to culture when people just start disappearing because they got market-rate offers.
It is worth calling out that compensation is more than just salary however. But if strong performers are consistently leaving your company due to compensation, then you're doing something wrong.
The former head of talent at Netflix wrote a great article on hiring and compensation that touches on these points: https://hbr.org/2018/01/how-to-hire