I wonder if it's not so much a function of age, but rather that "older" programmers want to live in a place where they can own a home and raise a family. That is exceedingly hard in the Silicon Valley, even for someone with a well-paid tech job. The cost of a rundown three bedroom bungalow in Cupertino is in excess of one million dollars (Zillow link: http://tinyurl.com/lq2wpcq). A four or five bedroom home is closer to two million. Purchasing such a home is a challenge for even a family with two tech incomes, harder for a family with one tech income and one "normal" income, and damned near impossible for a family with a single breadwinner. Even if you manage to pull off purchasing a home, you've still got a rundown bungalow. Why not go somewhere where you can better enjoy the fruits of your labor?
As a tech worker in his early 30s in the Valley, guys my age talk constantly of moving to Austin, Raleigh, or some other non-Valley tech hub---some place where the idea of raising a family doesn't boggle the mind. I suggest that while age discrimination may be very real, we must also consider that "the old guys" are merely moving out of the Valley. Thus, the average employee age of any company that has the bulk of their operations in the Valley will skew towards the young side. I don't believe it's a coincidence that the average age is less than 30, since 30 is about the age many educated men start a family.