Companies in general rarely hire older employees exclusively for their technical ability.
The typical 50 year old programmer has worked at numerous organizations, with dozens of teams, using at least as many technologies. This directly contributes to the development of non-technical skills such as communication skills, management skills, insight, and stronger perception. They're rarely oblivious to these skills (as demonstrated by the relatively low numbers of older professionals selling themselves as "programmers").