1. The ID should be checked along (and preferably) before the boarding pass is scanned. Most airlines do this; so this is an oversight from the agent to "quickly" let people through.
2. The agent was also lazy to investigate the situation and just assumed it was a "computer glitch". Again, probably breaking procedure.
This could have been worse but I wonder what's the point of all the security theater that the US goes through when simple security procedures are not strictly followed.