What's the alternative, be forced to drop out of university once you fail an exam?
We wouldn't have been forced to drop out (at least not due to that exam in isolation), but the 0 would have been considered as part of our final grade for the course.
At my university the year was divided into three trimesters with exam periods at the end, and a fourth exam period at the end of summer holiday. Each exam period would have the exams of all the courses of the previous trimester and also exams of courses of the trimester before for people who still needed to pass that course. If you fail the exam twice, you have to try again when the exam is given again next year (or try to argue with the prof to get special arrangements, say if it's the only one you still need for your degree).