Your lawyerly response notwithstanding (it's not illegal if they're under 40!), you don't fire someone because they are old. You fire them because they are underperforming, whether they are old or young.
This philosophy is just another extension of the fetishization of youth. Just because someone is young doesn't mean they'll be better than an older employee (and vice versa, of course).
Judge people on their merits and what they actually achieve, not on what their birthday happens to be.