Teachers are also punished for kids who give a try at non-mandatory exams, but fail. Those who wants to get it into university damn sure work hard. Meanwhile people who don't aim for university and take those exams for the lulz are likely to damage teacher's statistics.
Another fun fact - one of the points to certify a school as "gymnasium" is attendance. My school was certifying for that status during my last year. One of the vice-principals was nicknamed "12th graders attendance" since her office door was opening directly to cafeteria/lounge area and her #1 job was to make sure we attend as many classes as possible :)
No amount of absence would invalidate the course. But you if miss a test/quiz/project/etc, you automatically get 1 (out of 10). If you bring in a good excuse - of course you can re-do it at later date. If annual average drops bellow 3.5, school jury decides wether you can transfer to next year or not. In final year, < 3.5 would prevent you from taking that specific exam (which may give bonus points at your chosen university). If that exam is mandatory, then you have to repeat the course next year or drop out...
You're not kidding. My kids are in high school and the pressure on them to go to college is nuts. They push it so hard that it makes me wonder if there's some kind of reward for the teachers based on the number of kids that go on to college.