Why old people in Germany have such a hard time finding work

The underlying question is: should people earn more money just because they’re older? Or should the earn money according to their qualifications? The second options sounds fairer to me, especially if it means that unemployed older people have a fair chance of finding work in the first place.