I did a maths course at uni and I tried really, really, really, really hard, and I got 43. Just because you work hard doesn't mean you get the reward. Most times it does, but not always.
And have you talked to the markers about it? If you feel there's bias, go complain to a higher authority...