I have heard that companies like recent grads because they are (1) more malleable and (2) can be paid less. But neither of those reasons seem to me strong enough. I'm talking completely about the company's own interests.
Let's address the first reason: malleability. A recent grad presumably will adopt the company's culture faster, complain less, and in general pick up things sooner. Well, the hardest, meanest coworkers I've ever had were late twenties, early thirties. I've worked with people in their sixties, and they're sweet people. Even the grumpy old sysadmin had only a thin layer of spikes. After just a few days I could see through most of it, and he was 10 times more helpful than my other sysadmins. Not only was he softer (at least deep down) but he was smarter, having done it for decades. Even when he met a new problem, his keenly developed taste made him more likely to choose something that would be more maintainable long term.
Now let's address the second reason: salary. I am 10 times better than I was when I started. I know, because I still work with some of my code from back then, and I desperately want to rewrite it all. How much more does a senior developer make than a new hire? 50% more? Seems worth it to me. 100% more? 200% more? Still maybe worth it. And if some old fella can't get work at all, maybe he would settle for something between 50% and 100% more. I mean, why not at least make an offer?
It just don't make no sense. Other fields reward grayhairs. You see some sixty-year-old painter or architect or carpenter, you think he's probably pretty good. You see some straight-out-of-college twenty-something in . . . any other field, you think, "I sure hope he knows what he's doing."