There is a reasonably well-known practice called stack ranking, where businesses explicitly and intentionally compare employees, in an attempt to get rid of a small percentage of unproductive ones, and reward a small percentage of exceptional ones.
Your manager's statement “I can not give you a better performance review because B delivered much more than you did and I am giving them an average review already” sounds a bit stack-ranking-esque to me, and might indicate that your company is doing that.
Stack ranking is often criticised as being really destructive for morale. That's certainly how I felt in a job many years ago, where I believed I'd put in a year's worth of really good effort and done everything we'd agreed, only to be told I couldn't get a top ranking (and therefore a higher pay rise) because another (very deserving) team member already was, and there was only one top spot allocated on the curve.
Of course, this might not be a considered company-wide approach to performance measurement — I don't think that employees are traditionally told about other specific employees' ranks in a stack ranking system, and it would usually be reasonable to expect discussions in one-on-ones to remain reasonably private. If it is just your manager doing this, and only doing it in private one-on-one conversations, that doesn't sound like particularly good leadership.
However — if the company actually does want to directly compare employee performance, maybe to encourage competition and/or collaboration to drive improvements overall, there's no reason why they can't do that. Sports teams (rowing is an especially good example) have very intense metric-based competition between team members, who also have to very closely collaborate to succeed.
Obviously it's difficult to translate that to knowledge work, where the performance metrics are much vaguer, but the problem of a team with both internal competition and internal collaboration is the same, and some comparison of team members with each other — hopefully in a less negative and divisive way than you've described — could be a part of a successful approach to solving it.