But, is that bad?
As ChrisNorstrom's sibling reply points out, companies really do want young workers in technology. They're more up to date on languages and tools. They'll produce more work and dedicate more time when unencumbered by family concerns. They don't have an expectation of or a lifestyle that requires a six-figure salary. Experience is less of a concern in game and entertainment development than in other industries; it doesn't matter so much if a young hotshot clutters up the codebase a bit or reinvents some wheel algorithm, when this game will be shipped and a new one begun within a year. Even bugs stemming from inexperience are less of a concern for Valve than anyone else, when they own the distribution platform that can automatically push patches and updates anytime.
It's also not illegal if the "older" victims are under age 40. The Age Discrimination in Employment Act only forbids age discrimination against workers 40 or older. http://www.eeoc.gov/laws/types/age.cfm
Sure, it sucks for the fired workers. Sure, it sounds ruthless and inhumane. And sure, if Valve is blindly firing everybody between age 30 and 40, then they're being dumb, since of course some programmers are still 10x animals at any age. But Valve is not a charity or a government, and is presumably smarter than that. It's a business in mission to make games and money. Every business should be seeking to replace low performers with fresh faces. And in game development, the performance and business value of an employee does bear an inverse correlation with age, so lower performers will skew older.