One word: tradition. Both ways have both advantages and disadvantages. anonymity carries with it the possibility to pass social barriers for what is objective scrutiny of a paper. This has become obvious in some journals that allow open anonymous discussion of submitted papers. Being known (both as author and reviewer) adds social control. On the other hand, anonymity allows a reviewer to express criticism that he/she would not dare to do openly because of, for example, hierarchical reasons. In some (smaller) fields anonymity is easily seen through. The lists can e made much longer.
In your question, the role of the editor as a mediator and evaluator is not touched upon. An editor knows both names of authors and reviewers and should make sure that the review process is fair from both sides. Anonymity does not contribute in this sense.
As a reviewer, one also has the possibility to decline a review if one has qualms about the job. If you feel you need to withhold criticism because of the name of the author, then maybe you are not well suited for the review. In the traditional system you have the possibility of remaining anonymous although my personal opinion is that openness is better. I always feel I can take comments better if I know who they come from. I can evaluate if they are due to issues with language or a resear group with conflicting views etc.