The map was fine until the robot passed the second aisle. Then the corridor bent, the walls doubled, and everything after it was wrong. The cause is one loop closure: two places that look the same and are not.
You find it with a statistical test, then learn how to make the optimiser itself resist such mistakes.