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 your current pay, don't bother with negotiating for a raise. That's how you keep getting paid the same amount plus inflation. Go to the market.
That feeling you're talking about -- where the company rakes in millions and you're the reason why, yet you're paid table scraps -- it's because that's what you're worth. There's no greed. The company is just that valuable, and no one is making you a better offer, so that's how valuable you are.
There's not much sense in comparing notes or seeing how much everybody else is making, except as a way to incentivize you to do something about it (leave). If you like your security, then enjoy it. If you like your money, go talk to companies.
EDIT: Time to bust out one of the best comments of all time: https://news.ycombinator.com/item?id=2439478
Turns out he was a doormat in negotiating, though his salary history was cringeworthy. It pained everyone to hear it, considering how nice of a guy he was. In all honestly, $60K was a big step up for him. [...] He spent the next day in non-stop meetings with HR, his manager and the CTO. That Friday he simply handed in his badge without a word, walked out and never came back. Until 3 months later. As a consultant. At $175/hour.
(The most-popular comment list is interesting in general: https://hn.algolia.com/?query=&sort=byPopularity&prefix&page... Too bad when the scores were hidden, the list stopped working.)