The other factor that may encourage companies to terminate older workers is that age discrimination is not easy to prove, to say the least. It's easy for a company to fabricate a criticism or false allegation of misconduct or insubordination to issue a couple of write ups to an older worker and make it look like he/she was terminated because of some abstract violations. Or, the company may decide to undergo "restructuring" and "lay off" certain workers, many of whom happen to be older, and then go through another "restructuring" just a few months later and higher new and much younger workers.
Luckily, the courts recognize the above tactics that companies use and they consider many kinds of indirect evidence if age discrimination, including inconsistent or untruthful reasons for termination, patter and practice of replacing older employees with younger workers, ageist remarks, etc.