> Loyalty to a company is foolish, because the company has no loyalty to you.
In an employment context, all loyalty is foolish - if you take it too far.
In one of my earliest engineer posts, I had an excellent manager - an engineer himself, we got on really well, I got promoted, and I was given good work. He got promoted too, and I moved up with him. I flatter myself that I was a part of his success.
Couple of years later, there was a re-organisation, he got moved to Head Office ten miles away, and I never heard from him again. My new boss was a likeable but dull fellow.
My opinion: you should be loyal to your employer. It's not OK to badmouth your boss behind his back. It's not OK to scheme with your employer's competitors. Unless your boss is crap, you should have his back. You should do your best to achieve your employer's goals.
But you shouldn't confuse loyalty to your employer to (e.g.) loyalty to family members, friends, spouses and so on. Employment is business, and in business, money talks. I resented my boss for leaving me behind; but that was because I had confused employer loyalty with family-type loyalty. Of course, when he got the big promotion to Head Office, he was going to take it. He didn't owe me anything - I hadn't done him any special favours, I was just an employee like him.
People get betrayed by spouses, girlfriends and family-members all the time. It's shit, partly because people don't expect relationships of that kind to be transactional. Sometimes we misjudge people, sometimes things just don't work out.
But employment relationships are always transactional. There is always a price for which your employer will sell you out. Whatever the employer says, paid staff are not family. It's not reasonable to expect an employer to show you the same loyalty as a friend or family-member.
It took me the greater part of a career (and two divorces!) to learn this.