In every course I have taught, in every class, at least one person, and usually more than one, has done excellent work. Their contribution to discussion, their papers, and their thoughtfulness are exemplary. And, usually, some students do much weaker work, often embarrassingly so--I would not want to share their papers, for example, with any colleague.
This is likely true in any institution. In any case, when I give a low grade to a student, the work itself is not good, but it is as well manifestly much less meritorious than those who do excellent work. If I give a B- to a graduate student, the work is more than deserving of such a grade. I work hard with students to avoid C's and D's, with drafts, etc, but in the end they do not deliver good work.
In a university, this is also true of faculty who are at the probationary stage. When the university tenure committee meets, some candidates stand out. They are spectacular. They've done what we would want, and done it excellently. (These are not external lateral hires, but those who were hired perhaps 6 years ago as new assistant professors.) And others, with all the help we might give them, do not deliver.
In between are all the intermediate cases. In classes, we can give intermediate grades. In tenure decisions, I have been told that if you have doubts about quality, vote NO.
There is an interesting problem when we consider compensation. If we have a bureaucratic system of salary determination, with movement between levels bureaucratically defined, then the issue does not come up much. Surely there are different scales for those in some fields-- business and law for example. The argument here is that we want to attract the best, and the comparative external salaries are much higher than we offer most faculty. (There is little consideration that perhaps teaching and research offer advantages over practice that are especially valuable.) But what is irksome is that some second-rate scholar in one of these higher-paying fields is paid vastly more than the strongest scholars in more conventional fields--often new assistant professors are paid more than distinguished full professors in the conventional fields. Perhaps the engineering and science faculties also have much higher salaries. If salaries are secret, one might not worry about this, but in general that information leaks out.
The perception of the excellence of the institution as a whole is almost always a matter of its conventional fields. So a university's first-rate history and mathematics departments, as evaluated by peers, may have faculty salaries that are much lower than their second-rate business or law schools. A provost might want to invest in conventional departments if they were concerned with the perception of excellence.
Of course there are other issues. Professors in "hot" fields are likely to be able to bid up their salaries, again their excellence as scholars being a secondary factor. Professors who work hard to generate external offers, will also be able to generate higher salaries for themselves (although the provost or dean might wish them well in their new institution!). On the other hand, professors who are doing what they really want to do, in teaching and research, might view all of what I have discussed here as interesting but missing the point. In pursuing their scholarly life, they are getting paid decently and they are getting away with murder.