What you are saying is definitely true. I am glad that the companies/organisations which I have joined are doing their part in talent retention and they are emphasising a lot on people development. However, that doesn't stop people from leaving tho. Especially those younger ones who are more mobile, wanted to try out other stuffs, think they are worth or can do more outside etc.
How about the employers? Loyalty is a two way street. If more employers are more often treating employees as disposable commodities rather than as genuine long-term partners — and I think that’s a fair characterization of recent history — then employees properly shouldn’t be loyal.