I can not judge whether the 38-rule is against any law. Or contradicts fairness or should even imply moral scruple... There must a reason for this rule, especially as they block some good candidates for themselves too. Maybe I had some reservations as well, if I had the same age as you obviously have.
But they decide what they want, clearly stated on their web site. If you have a problem getting a "no" AFTER you read their criteria, then you should maybe not take it too hard...
N1
PS: The company is german property, but run according Swiss law,
AFAIK.