Imagine the crotchety (young) programmer you know. The guy who’s kind of a mild know-it-all, who gets disinvited from business meetings for being too abrupt, they guy you have to front with a good PM to talk to anyone external. Maybe a little autistic, perhaps undiagnosed; regardless, they seem to have trouble connecting and “getting” people.
Early CS - before it was well known that it would be a fast track to the upper middle class - was full of these people. Computers draws that personality type in. Limited interaction with others, working code wins, you can get lost in a math problem.
But we needed more programmers! And now, it’s well known that being a programmer is lucrative. So the younger generation is less full of people who really love computers and want to escape human interaction; they learned computers cause they’re smart, and want to make money. But they’re probably good with people too! Most people are.
Where does that leave the older generation? Over a certain age, you’re more likely to be the type that’s a bit hard to work with, swimming in a sea of graduates who have people skills now. And as you might expect, companies will pick the people with hard and soft skills given the choice. They don’t want to entertain the prickly guy who wants a math problem and a pizza slid under the door, if they have alternatives.
As the pool of devs widens, expect the age discrimination gap to narrow. Not go away, but narrow. People never really liked the no-social-skills aspect of CS nerdiness. They just tolerated it, for a time.