Ageism exists because people above a certain age cannot keep up to the demands of the job. I am sure a lot of folk disagree here... but you would agree that old people's brains aren't as fast as young people and even old people experience can only hinder them in a world thats all but changed completely.
This test you speak of is how mostly it works now, but only inverted: reject the vast majority of old people... and only hire the outliers.