Just for the record, in Germany it is mandatory for kids to go to school until at least grade 9. No homeschooling here! If you can’t go you need to (eventually) bring a note from your parents explaining why.
What you probably noticed is that in the higher grades the note-from-your-parents thing becomes increasingly moot because students eventually turn 18 and are legally adults and responsible for their own actions. In addition, when I was in our equivalent of senior high school (grades 11-13) the rule was that if you missed more than 25% of the sessions of a class without a plausible excuse, your grade for that class would be reduced to zero, and that might or might not be a problem depending on whether the class was mandatory to take (zero being equivalent to not having been there at all), or whether you planned to include that class in your graduation transcript. That gave you a certain amount of leeway as far as attendance was concerned, even without cooperation from your parents. (School rules are a state thing in Germany but I suppose that sort of thing is roughly similar in all states.)