

It’s literally the opposite. It’s very rare to work for a company that will consistently give you cost of living and performance increases that would outweigh a lateral move to another company. Someone who stays with the same company for more than five years is likely losing money to stay there.
If you’re a first year painter working for a general contractor, you’re going to be paid less than a more experienced painter. After five years, you’ll be able to get more money from another general contractor applying as a painter with five years experience. You’re less likely to do that if you like working for your current general contractor.