For those who are unaware of the German system, "high school" here presumably means the "Gymnasium" or similar track that prepares students for higher education, as opposed to the vocational dual education track that includes vocational schooling and apprenticeships.
Yes, you're right, the German system is a bit weird.
In a nutshell:
At the end of primary school your primary teacher recommends whether you should go to Hauptschule, Realschule, or Gymnasium. H. and R. ends after year 10 after which you're supposed to go to vocational school, but you can also switch to G if you're good enough. G ends after year 13 after which you can go to vocational school or university. H and R cannot go to university after year 10, they have to switch to G.
The primary school teacher's recommendation is usually not binding but most people follow it. There's a lot of proven bias against children of immigrants. For example, often these kids' language skills in primary school are poor leading to generally poor grades, but that could be fixed with a bit of extra work. But the teachers often don't have time or patience for that, there's no extra money for additional private teaching, so off to Hauptschule or Realschule it is.
In this data, the social standing/education of the parents has a big impact too, children of immigrant parents who went to higher education have an equally high recommendation to go to G., while kids of parents who had worse education do much worse in the post-primary school recommendations
This is generally correct and a huge problem.
Note that the details of the process differ quite a bit depending on federal state and decade. What may differ are things like duration of Gymnasium, whether recommendations are binding, whether there's a clear distinction between Hauptschule and Realschule, duration of primary school (e.g. 4 or 6 years), how easy it is to switch etc.
In my case, primary school was 4 years, recommendations were binding (!), so you basically got put on a rigid track based on one person's opinion when you were 10 years old.
Unsurprisingly, that leads to material biases based on parents' education and origin.
I'd like to add that in some states (e. g. Bavaria) it is very hard to change to a higher track (especially Gymnasium) after the decision in 4th grade. The importance of that decision on later life is hard to underestimate.
https://en.wikipedia.org/wiki/Education_in_Germany
https://en.wikipedia.org/wiki/Dual_education_system