Some of the best all-around programmers I've met, and also the best programmers at some specific metric (rapid development, good at unraveling complex problems, good at big-picture stuff, good at architecture, good at maths/algorithms, etc.) make market rate or below market rate. Probably because they either (A) don't know their value (B) didn't go to a top CS school (C) value things other than raw income (D) aren't good at playing the political game at work (E) aren't good at self-promotion.
What paying high salaries does get you is... the widely-publicized knowledge that you pay high salaries. Sites like levels.fyi and HN will viralize this knowledge. Like your neighbor who has a shiny new BMW M3 in their driveway, you assume that they must be doing well, and must be a good investment.