I think you might misunderstand. Typically there are at least a midterm and a final exam, and sometimes homework counted into the grade. So, depending on the respective weighting of each exam and the homework, a B on the final with an A- in the class is entirely plausible.