But the tech would have helped in this case: the flight attendent saw that the pass was already scanned, "assumed it was a glitch" and let the real ticket holder on. If that system showed a quick pic of the person who previously boarded, I doubt they would have done this.
If the system worked as you propose, but regularly glitches, it would show someone's picture when it glitched. The check-in staff wouldn't see anything weird about this particular person's photo: he's not otherwise noteworthy. Maybe it would be the person with the seat number from a previous flight.
The attendant assumed it was a glitch because it usually is a glitch. The official policy is that there are no glitches and that the staff member should have called security and investigated the plane. The actual policy from middle management is "if you do this you will end up calling security 30 times a day because our systems suck and half our flights would be delayed, so just use your judgment until the technical issue is fixed".
Here they really do need a technical solution to a technical problem. Improve the tech so it has false positives on less than say 0.1% of flights. Then you can enforce the official policy and discipline staff members and/or their managers if they don't follow it.
The glitches wouldn’t be arbitrary like that. There is no need to assume a data corruption issue or anything like that to explain the glitches. It’s much more likely in my opinion, that the system regularly receives bad input due to people behaving in ways it wasn’t able to track. For example not scanning, double scanning because the attendant was moving the scanner around rapidly, people needing to exit the line due to one member of a larger party (eg a child or spouse) having a problem after part of the group had already been scanned.
As I understand it, the data is linked in the background in some airports, i.e. they just check if there's any boarding pass in your name (and presumably date of birth to disambiguate; most if not all airlines collect it nowadays) in the system.
They do if you have multiple valid boarding passes leaving that airport the same day. The flow is present ID -> machine says "multiple flights, scan bp for one of them"