You can file this under things you may have always wondered but never actually researched the answer. A baggage handler on TikTok showed the process of filling the undercarriage of a plane with luggage.
It's kind of like a game of Tetris. He crawls into the baggage area with a small conveyor belt, gets himself situated, and then the bags start making their way down the conveyor belt. He puts the hard case bags on the bottom level and then in a very strategic, Tetris-like way he fills in the rest and all the gaps.