What non-specialists need to keep remembering is that a book is not printed all at one go.* It is printed in sections (signatures) usually of 8, 16, 32, 64 pages — a number governed by the need to fold the sheet down. A modern web press will deliver already folded sections — they get folded on the press after they’ve been printed. But when we used to print most books sheetfed letterpress or sheetfed offset there was an additional step. After they were printed the sheets went into the folding department. Out of there came folded sections which then went to the gathering line, where one copy of each section was picked out and placed on a stack containing all the other sections. Most simply this could be done on a circular table with stacks of sections. A worker would walk round the table picking up one section from each stack in order so they ended up with a complete book: a set of folded and gathered sheets (f & gs). We used always to get a couple of sets of trimmed f & gs sent to the office as a useful final proof before the irrevocable step of binding up the book.
This video shows a modern binding line with the gathering station at the front end. You can see it pick one sig from the bottom of each pile, passing it along on the conveyor belt to the next station where another sig will be added. This one is gathering a short book, and is doing two copies simultaneously. You can see most of the pockets are not being used.
* There used to be a gigantic press, the Cameron Belt Press, which would deliver a gathered copy of an entire book. This was a letterpress machine, using rubber plates and a cunning wheel arrangement which would sort the complete book into its final page sequence, ready to go straight into the binding line. I am not aware of any still in operation, though the world is a big place.