He expects that he'd be working at least 2 hours of such overtime every week.
This would be illegal in Germany for any worker. Overtime can be used to deal with temporary changes, like maybe christmas season. It cannot and should not be used to change people's weekly hours. Any overtime must be regulated that on average you are not working more than 48h per week.
Please note that for apprentices (Azubis) in Germany, 5 hours of school count as 8 hours of work if they are minors. So if you are in school 08:00-13:00, your 8 hours for this day are full. The only way you can be ordered to come back and work is if some of your school hours are cancelled. For example if of the 6 "hours" of 45 minutes each, the last two are cancelled because the teacher is sick, your employer can have you come back and spend the rest of the 2/6th of your 8 hour work day in the company.
In practice, this is rarely done, because the travel time from school to the company premises does count against this, whether you are a minor and school lessons were cancelled or you are not. So in this example, you'd have to work a little over two hours when you finally arrive. If it takes an hour to reach the company, you will be there for little more than an hour on a day where nobody expected you. That's not really helpful. At least for my Azubis, the rule is that if school is cancelled or does not take the whole day, you win. You are not a full blown worker drone yet, go out, have fun and have a nice day.
What I wanted to say: make sure this is calculated correctly. Nobody needs to work after school on normal days, because it just does not make sense. Exceptions apply if you are not a minor and your company is very close to school.
Overtime cannot be ordered for Azubis, no matter how old they are. The IHK (chamber of commerce, organizer of this apprenticeship) says:
Der Auszubildende ist grundsätzlich nicht verpflichtet, Überstunden zu leisten.
(As a matter of principle, an apprentice is not obligated to work overtime)
You may mistake this with the regulations for minors, where it's even illegal to work overtime. If you are not a minor, you may indeed volunteer for overtime. But minor or not, nobody can make you work overtime in your apprenticeship.
The boss probably knows this.
He's doing this a lot longer. If it's in your favor, assume he is correct. Matter of fact, he is. Even if he wasn't, you cannot second guess every single thing he says. Ethically, you gain no personal benefit from this decision. You are not getting more money for example. So I don't think there is something wrong with assuming your boss is correct.