I can't imagine marking the exams was a significant part of the professors time. Especially because its probably the sort of thing they could get an assistant to do.
That said, in my country (in EU), it's not indefinite tries. The fourth and later attempts (up to 8, I think) have oral exams in front of a panel of professors so that they can evaluate if there is actual lack of knowledge or if there is some sort of problem between the student and the professor. The student must by then pay for the attempt to pass the exam. It's not expensive, though, it's just another incentive to make the student really be sure to be prepared.