Don't forget the third big reason, which is rarely admitted. Younger, less-experienced managers often feel insecure around older, more experienced staff. And they may have authority issues with parental figures which make older workers very unappealing to them.
There is no solution to this problem but to move on. Chronic labor shortages tend to improve the situation.
So, you've met my boss. He has surrounded himself with a bunch of 40-something sycophants.