I don't think what you're saying is accurate. Your statement would be correct if the measure of how slow the algorithm is is how much compute time it takes.
But the measurement they're actually using is how many books need to be moved. They're free to use infinite compute time AIUI.
I think the point is that having less information available can improve performance because it eliminates processing of extraneous data.
Said another way, stateless approaches are simpler than stateful. There can be an instinct to optimize by using more information, but in this case at least, that was a red herring and adding the constraint improved the results.
But the measurement they're actually using is how many books need to be moved. They're free to use infinite compute time AIUI.