"Corporations no longer are loyal to employees."
I don't find this to be universally true. I was at Google for five years. When my first daughter was born, they gave me 2 weeks of paid paternity leave. When they upped the policy to 7 weeks months later, they made it retroactive and gave me another 5 weeks to spend with my new family. When I was dealing with health problems, my managers were extremely understanding and put a number of different options on the table for how they could help me cope. When my wife and I decided we needed to move somewhere without a real Google presence, they bent over backwards to find a way to make it work without my leaving the company.
It's difficult to separate "company X is being nice to employees because it is in their best interests right now" from "company X is showing loyalty to its employees," and in general morally upstanding behavior coincides closely with long-term self-interest. But to my mind the way I was treated constituted loyalty. The clincher to me is that Google has a newer extraordinary suite of benefits for the families of Google employees that die. That is a good, loyal, and _expensive_ thing to do, and I have a hard time seeing how it makes sense as part of some cynical calculation. I don't think a lot of employees are going to be attracted to or retained by Google because of its stellar death benefits.
To be sure, I know this doesn't mean Google would never ever lay devs like me off in a downturn, nor does it mean that I would never quit Google. (In point of fact, I did.) But I definitely don't advocate, as you suggest, that developers simply go to whatever employer is paying the most right now. Go to whatever employer has built a reputation for treating its employees the best.