As one example: it is illegal to say anything negative in a letter of reference. See https://workplace.stackexchange.com/questions/74438/recommen...
Why anyone would anyone take a risk? To make someone feel better?
Straight out of college I got rejected by failing miserably at a technical interview almost to the point of tears when I realized how little I knew. Maybe my interviewer saw this but I got very practical feedback, and knew exactly what to do with myself that summer to get hired.
Normally, in Germany, in your resume you should have a photo and specify your birthday/age and nationality, especially important when applying at traditional engineering companies. This opens you up for a lot of silent discrimination.
So, if they reject you for being the wrong age, nationality or skin color (yes that happens, a former German manager explicitly told HR he doesn't want Indian candidates on his team) or for speaking German with a strange accent, they definitely don't want this information getting back to you as you can sue them for that so the only feedback you're gonna get is the legally safe copy-paste "unfortunately, we're looking for a candidate that better suits our needs".