@rysiek The way this fuckup happened, reminds of a funny but true story.
When I was student (half a century ago), I participated in a programming competition. (PCs didn't exist back then; we wrote programs in FORTRAN for a mainframe.) The task was to write an algorithm for a machine that returns change. The input data was how many coins and banknotes of each denomination the machine had, and a list of values it had to return. The algorithm had to be clever enough so that if it couldn't use the minimal amount of coins and banknotes, it had to switch to other amounts, using the available quantities. The condition said "process as many transactions as possible", obviously meaning the above level of cleverness.
Well, one chap took the condition way too literally. His program buffered all the change requests until there were no more and *then* re-ordered them, in order to fulfill as many as possible with the available money/denominations.
While it clearly "optimized" things, in real life it would have lead to idiotic delays, just like this case with drivers waiting for all the pizzas to be ready.