I have found that to be the case as well. Using a combination of skillful salary negotiation, leveraging counteroffers (use sparingly), and hopping between companies, I have averaged 19.5% yearly salary increases for the past 10 years. Obviously this is not sustainable, since my current salary level limits the number of positions I can take without taking a pay cut.
For those who are curious, it took 6 companies over those 10 years, with 1 career change from teacher/manager to programmer. During that time, the largest year to year jump was 38% (2nd was 37%), the longest time spent at a company was 3 years, the shortest was 3 months. I used the counteroffer trick twice, once quitting and once staying.
After seeing how difficult it is at any company with an HR department to approve raises or approve title changes, I'm not even going to bother in the future with trying to do that. Do a good job somewhere for 1-2 years, accept offer at new company, rinse, repeat.
What did you tell the next company during the interview when they asked you why you were looking to leave your current job?
I didn't interact with anyone outside my company, and pretty much the rest of my coworkers were the same. It was like we were in this little bubble and that's how we thought things were outside the bubble. Pretty much everyone in the company (<20 people) went to this startup right after college so AFAIK almost no one got recruiter spam because we didn't even have LinkedIn profiles. It was also over 6 years ago, so the ecosystem was a lot different too. But we were definitely in our own little bubble and it was only when I met my husband (a software dev) did I realize that I was being underpaid.
Glad you got your pay rise.
Reason #1 against taking the counter-offer: The boss is already planning to replace you, just on his terms instead of on yours. I.e., you could stay but get laid off as soon as they hire and train a replacement.
Reason #2: They didn't respect you properly before, and the information of a new job offer isn't going to fundamentally change that.
I've always found that switching jobs is easier than getting a proper pay rise. Asking your boss for +10% and getting offered 2.5%. Go to some interviews, accept, hand in notice. Boss offers +15% for me to stay... wtf. Poor communication skills from both me and my boss I guess.