The other answers already provide explanations specific to the grading system, and they are spot-on in the context asked about in the question. Nonetheless, I'd like to add this answer with an equally valid explanation on a more general level which works even unrelated to grades:
If the grade is sufficient, why would that be unfortunate?
This appears to presuppose that "sufficient" is a binary measure, that something is either sufficient or not, and that's it. With this assumption, it is indeed hard to grasp why something being "sufficient" would be unfortunate, as "sufficient" is usually the more desirable state among the two.
However, consider that there can be states that are better than "sufficient", and the statement suddenly makes sense again. "Sufficient", is, well, sufficient, but not any better than that. Hence, it can well be unfortunate that something is only "sufficient".
This is the principle at work with the grades, but it also works with any other adjective:
- Unfortunately, the food is only tasty. (But it is not addictive.)
- Unfortunately, the delay is only very short. (But it is not completely absent.)
- Unfortunately, the new product will only increase the percentage of customers among the intended target audience. (But it will still not entice everyone among the target audience to buy it.)