While this does need to be investigated and will be, this is what is known as a mid-ID. Sadly it’s not uncommon and happens when agents don’t properly check documents or get distracted.
In this case it sounds like the customer was rebooked onto the BA flight and sent to the gate for the boarding pass. The fact that the crew said that he was good to travel and mean to be on the flight supports this. Had the op been the first to bird, then this customer would have flagged when boarding just as the op did. Sadly, the agent didn’t follow the correct process which would have been to cross check in system when boarding pass was first scanned, confirmed they had right customer and then either get someone to go with customer to aircraft to cross check.