Bachelor and master theses are never graded anonymously, at least not to my knowledge. Usually your grade is not only determined by the thesis you submit, but to some extent also by your engagement, initiative and the general quality of work you delivered.
Here at my university in Germany it is common practice that the supervisor (usually a PhD student) proposes a grade to the supervising professor who in turn has the final word.
To the last part of your questions: In a perfect world there is no need to ensure fairness, because you will get a grade according to your performance. In reality, there can be differences with your supervisor of professor. If you think your supervisor treats you unfairly, you should carefully approach your supervising professor. You should have evidence, because such accusations are kind of serious and can get people in trouble.
If you think your professor graded you unfairly.. well, this is difficult. To my knowledge, there is not much you can do about that. But I can only think of your professor letting you fail the thesis as the only situation where you want to complain. If your grade is just bad, maybe your professor has a different reasoning or opinion on what makes a good thesis, which is his/her right as supervisor. This can be avoided by clearing general issues beforehand.
Edit: Just as a remark: Everything I said applies to what I know from engineering and similar sciences. It can be totally different in e.g. social sciences, about which I don't know much.