Because reviewing is a reciprocal process, meant to be a safeguarding space for valid scientific input, anonymous reviewing is the standard default option. Anonymity should mean protection for the reviewer from retaliation and discrimination.
Are peer reviews confidential?
During the peer review process, information and documents are generated that authors, reviewers, editors, and journal policy may consider to be confidential. ... Confidentiality varies among these items, and it may be treated differently when third parties request such information.
Why are reviewers anonymous?
The big reason for anonymous peer review is to allow the reviewers to speak their mind without fear of the authors taking revenge. Even if it's easy to identify, retaliation can happen: it's already decently common for authors to get angry when their paper is rejected for reasons they do not agree with (example).