See screenshot of student below:
What happened here? Student has had 1 attempt. Teacher graded this 5.0 but made a mistake and changed this to 4.0.
Student now see two grades: the grade from assign_grades attempt 1, which is 4.0 but also sees the old (wrong) grade 5.0 from (and in) the grade book. This grade has never been updated with the correct grade.
In our institution the number of attempts for an assignment is pretty important. For example you get TWO attempts for every assignment. After turning in the first assignment, there can be a review with the student and the teacher. The first attempt can be corrected by the teacher based upon this review. So that is why grades for the first attempt sometimes are corrected... but of course the teacher can always make a mistake and should be able to correct the grade for the first attempt anyway.
NB: there's NOT a higher attempt made than attempt one in this example. So the 5.0 you see above is not from attempt 2 or higher, it was the wrong grade entered at attempt ONE which has been corrected. Tabel assign_grades has stored the correct grade, however table grade_grades still shows the wrong grade.