Workers are seen as interchangable at many places. just look at Amazon, one of the most profitable and productive companies in history, that takes pride in how it wears down its employees using corporate language that I'm sure you're painfully familiar with. Because of this, they aren't going to give you a raise even if they have objective proof that competitors can recruit you with higher raise and other benefits. Again, even FAANGs with their near unlimited resources have been found guilty by the American legal system to conspire with each other to keep salaries down. These issues that conspire against workers aren't due to individual flawed companies or policies but principles and philosophies that are at the very core if how companies view their employees, especially in tech. From a company's point of view, suppressing salaries not only makes sense, it's deeply ingrained in the larger corporate hive mind that they are a part of.
TLDR companies really do not have your best in mind and what is best for them often means the worst outcome for you. So get that raise by switching employers; if the roles were reversed, your employer wouldn't think twice about it.