Sure.
When you are hired, you can negotiate a salary $X based on your skills, the company's needs, the job market, and a whole host of factors.
At each pay review period (or however your firm does it) thereafter you may get a salary increase of Y%. The realities of corporate politics, management, social dynamics, etc. say that the frequency of the review (or if you even get one) is mostly out of your control. Further, the amount of the increase may have little to do with you; maybe there's "no room in the budget for increases this quarter", or maybe your manager is giving you poor evaluations to try and keep you from being promoted out of his department thus reducing his headcount. Finally, there is a force in almost every organization that says that salary should be based on seniority not merit. There may be pay grades, or salary caps, and there is almost always some limit on the size of the raise any person can get without a top exec signing off on it. I could go on. :)
Meanwhile, you (hopefully!) have more knowledge and skills than when you were hired; you certainly have more experience. After a few years, you are almost certainly worth a lot more than when you were hired. (If the job market has improved since you were hired, this goes triple.)
The end result is that, for most people, your salary represents a pretty good snapshot of your "worth" when you are hired, but every quarter thereafter it diverges. Changing jobs periodically lets the good employees "lock in" that extra value. (Meanwhile the poor employees will do their utmost to stay, as they know they may not deserve all of the raises they've received. This is but one of many reasons why organizational performance trends downwards over time.)
You'd think that you could just renogotiate with your current employer. "Hey, I know I was only worth $60k when you hired me, but I'm now an expert on X, Y, and Z, and the job market is really hot right now. I know you've upped my salary to $90k, but you'd have to pay over $140k to replace me. Give me a raise or I'll go next door and get $120k." Seems logical, but human nature being what it is, this never works. Instead, you quit and go to work next door for $120k, while one of their guys quits his $90k job and comes to work at your old employer for $120k. Of course, both of you are now less productive for the next 6 months as you learn new systems and a new codebase. It's silly, but there you are.