This is it, exactly. Loyalty used to be a positive in the business world. Companies used to brag that they had many long term employees. The president of the company I used to work for used to say, "once we've had them for five years, we have them forever!" and he said it with pride in his voice. They used to go out of their way to make you want to stay.
Now? You almost get made fun of when you tell people you've worked for the company for many years. The managers think you hold the department back because you remember when quality was the idea, not quantity. The managers hate it when the new people come to you for advice because you treat them like people instead of numbers.
And when there are budget cuts or short falls, you are the one they let go. Your years of loyalty go down the drain, because they can pay an out of college person half of what you earned, and they only have to give them 2 weeks vacation instead of the 5 weeks you get.
And yep, you guessed it - it happened to me. Took me a year to find a new position, and it doesn't pay what the old one did, but it's a job. So I'm still looking, and I will have no guilt when I leave this current position and move on to the next. I wish I had learned that many years ago.