I would guess the single mistake was that it was accidentality scanned as having being picked up, but wasn't actually picked up, it just sat on a shelf for a few hours.
After the rush calmed down people started saying "hang on, what's this pizza doing here", then they made a new one and delivered it.
Of course the correct thing to do is issue an apology and refund with the replacement.