At lower levels of education, you can indeed define answers on an exam as "correct" or "incorrect", but as you advance it's likely that there is a gradient rather than a binary. For example, both students may have solved a math problem but one comes up with a much more comprehensive and elegant solution than the other.
Additionally, as you advance exams tend to have more open-ended questions. You do not simply regurgitate facts. You explain and analyze an answer. Inevitably, some students have a more comprehensive analysis than others. I have a law degree. In law school exams, the grade stack might look like this:
C: Mostly correct, but a few errors (misidentifying the applicable law, or a flawed analysis)
B-: All answers basically correct, with maybe a minor error in phrasing or slightly misapplied analysis
B: All answers correct, but somewhat shallow or rote analysis
B+: All answers correct, with some deeper analysis that might miss some fine points
A-: All answers correct with insightful analysis
A: All answers correct with deep analysis that shows true mastery of the material
At my law school, the grades were on a forced curve, but grades below a "B-" were discretionary. Keep in mind that getting in to the school in a first place meant you were an A student in undergrad, so many students felt a shock to the system when their fully-correct exams started rolling in with "B" results.