Focusing so heavily on computer science trivia questions favor those who recently went to college, since those tidbits are so rarely needed at the drop of a hat in industry those neurons wither away with more time away from academia. Older developers know you can just look it up.
Take home quizzes and side projects require significant time investments. People tend to have less free time as they get older due to family obligations, changing priorities, and so on. People directly out of college likely have less of these external time pressures and would have less of a problem solving your so-clever little project that only takes 20 hours.
Until we, as an industry, get over the lie that hiring must be incredibly accurate and therefore favor the so-called "false negative", we won't get rid of this kind of discrimination and we'll continue to harm people simply because they're older; not to mention losing out on potential co-workers with a plethora of knowledge and experience.
It's bizarre to me that ageism exists. Other forms of discrimination can be traced to othering someone because they are dissimilar to you. Every single human will become an older person one day, barring early death. Perpetuating this cycle is self defeating in the end.