1. They perceive a tail risk that at least one student is willing to spite the others. Possibly a student that has less to lose from bad grades than their classmates do, but that's not the only context where it could happen. While an assumption that everyone has the same values and will make the optimal choice under those values often leads to an effective approximation, modeling human behavior isn't always that simple... especially when only one person has to deviate for your model to make a catastrophically wrong prediction.
2. Grades aren't quite on an absolute scale; at least when pushed to extremes like "everyone in the class gets an A+", the most sophisticated readers of the transcripts will interpret that A+ differently than an A+ in the same class where the distribution of grades was more typical.
3. Getting yourself to behave in your long-term self-interest isn't always trivial. People do things like publicly commit to donating to a cause they hate if they don't achieve goal X, to try to increase their chance of reaching that goal when they've wanted to but failed in the past. Meaningful grades can be better than their absence if you struggle with self-control and trust the professor enough.
4. If you have a clear interest in seeing your classmates put effort into the course, you might vote against this.
Note that, in some of these cases, the student has an incentive to be quiet about their primary motive and instead give the cover-story explanation Varoufakis heard. I don't think those cases are likely (I think it really is mostly #1), but I wouldn't rule them out.