As mentioned previously there are a couple ways to enter seat numbers in at the boarding door. IMO, the most accurate is the scanner that reads the boarding pass. If the BP is not for the flight the scanner is working, there will be an error message. You can also use a manual method where you put the seat number in and need to verify the name on the boarding pass with the computer. It's possible the passenger had the same last name or the agent just didn't see it. There is a lot the agent needs to do when the passenger boards; scan or verify name, see if selectee and has TSA stamp, make sure they are fit (not drunk) for travel, unfold the boarding pass that is now an origami creation, search through the ticket jacket that contains everything but the BP, etc.
Why not use the scanner all the time? Some gates the scanner is slow, sometimes it doesn't work at all and some are old dogs not wanting to learn new tricks. Personally, I like the UA scanners.