I mean, it's pretty simple, but it took a long time to internalize: If you don't have anyone else making you an offer, then you're worth that amount. In this case, you were worth $42k and $56k respectively. If you'd shopped around, you'd have been worth more. But you didn't, so you weren't. That's not a bad thing, either. Security is nice, and interviews are a pain. But it really is that simple. If you don't like you…
You are confused about cost and value.
I have seen a lot of people with high salaries that are more of a problem than a solution for the company. As an example, you can look at the executive that fired Salesforce red team at the DefCon.
Companies and upper management are usually bad at evaluating the value of employees. In some cases even punishing good employees while rewarding more ass-kisser types.
So you can be worth a lot, but be paid quite low. As cost and value are not always correlated, and rarely match each other.
For the part of looking elsewhere for a better salary, I agree. The managers are doing a poor job and moving around is the only option. This is a huge cost to the companies that lose expertise and need to train new employees and show how much overpaid their managers are because pay and worth are not related, and this is big a problem.
* https://arstechnica.com/gadgets/2017/08/salesforce-fires-two...