For age, it's hard to guess if the productivity is more or less for older people (the extra wisdom and experience helps a lot!). It must vary by field. It'd be pretty shocking if no fields at all have significant correlations between productivity and age.
Beliefs That Hurt People != Beliefs That Are False
File that under "things you're not allowed to say." But it's worth asking what you think it would be just for society to do if it turned out, on some topic, that the ageists/racists/sexists/religionists/orientationists?/etc. . . . were right.
As for individuals, they should do what they think is best. So some will think it's bad to hire X persons b/c they are, in fact, 3% worse at their jobs. And others will think it's bad if no X persons can get jobs, and will hire them at full salary to be nice, or to use in marketing literature. And others will be happy to hire X persons, but at 3.1% less than the market rate would be for non-Xs with the same skill set. etc. shrug.
Which is the larger inefficiency: People acting according to their best judgement, but they happen to be wrong? Or people unable to act according to their best judgement because they can't document that their motivations are pure?