The engineers I've known and worked with were more likely to judge someone as being "like them" for their usage of Emacs vs Vim than their race, and everyone is always trying to recruit more women.
The ageism is more tied to actual technology things. The young engineer thinks the latest blog post they read about how to do async programming or manage deployments is the greatest thing in the world and only wants to hire people who think the same. The elder engineer recognizes it all as slight tweaks and rehashes on older ideas, frameworks and systems and is more ambivalent and not as excited to dive into learning their hundredth new way to accomplish the same task.
If management cares about business outcomes, the elder engineer is great. If management cares about vanity metrics and using the latest, coolest frameworks, the younger engineer is great.