Look at it this way:
The grades are an indication of what you're capable of, and not something you should have as high as possible. If they aren't high enough, you 1. Don't learn good enough, or 2. Aren't capable of the level of education you are following at that moment.
You should work for them, but if you break under the work you have to do for them, please get another level of education.
This is not directly meant for this moment, or for you specific, just in general. If your grades are not high enough, don't blame it on yourself, but make sure your level of education is not too high for you.
And that's poorly-worded why I'm not too stressed about everything.
I tend to think that grades are there for motivation. People enjoy being rewarded for their hard work, and, depending on the quality of the work done, the bigger the reward is. Now, if they don't do it well, they won't get rewarded for it. Imagine, just for a moment, how would you feel if grades weren't there to show you how well you are learning. You wouldn't really want to do anything then, right?