Did the gate agent do any follow up verification? Like checking the flagged passenger's ID?
In retrospect, modern computer systems are inscrutable and unreliable enough (as a category) that it's rational to disregard them, especially if you've done some independent verification. Rational doesn't always mean correct in a specific case.