I've had 50% pay raises that were nearly matched by the current employer. My last manager literally said the words, "What if we offered you a big bag of money to stay?". I left.
Now I work at a place where people stay literally until the die, 10, 15, 25 year tenures. My coworkers are mediocre. I'd say it's a mixture of laziness and sometimes maybe just incompetence.
It's a two fold problem. Employees that stay this long do not progress in their careers or learn new skills. I've learned next to nothing in my 5 years here. Employers that don't create churn in their workers create numerous problems. If we didn't hold a monopoly in our field, I'm sure we would have been bought out and had mass layoffs by now.
Oh no, you tell them before you start looking that you feel like your TC is too low based on your contribution. You don't threaten to shop around, you just tell them your skillet has value beyond what they're offering.
It goes like this: either they come back with something to make you happy and everybody is satisfied, or they don't and you start applying.
But people don't always give employers this chance and just start applying first. Then when they go to leave things get weird with counter offers.
If you think your job sucks and you're ready to move on, there's no reason to bother with this approach. But if the only reason you're thinking of moving on is to increase your pay, it never hurts to ask first.
Ambitious employees "know" that switching jobs will give them the pay they're looking for, because they see those numbers right on the job postings. What's less obvious is that a current employer might really value an employee's skills, and would be willing to match or exceed the competition - if they just open up the conversation.
IME it's not even (always) any kind of rational decision on behalf of management to "stiff" people. If you have a happy employee making a wage they're satisfied with (+ annual COL), then these conversations about TC may not even come up at all. It's easy to just turn on autopilot here.
If you like your job, but you're not happy with your TC, make sure you're letting management know. It could be that everybody could end up happy. Even a good manager might not be doing this for you until/unless you advocate on your own behalf.