I work in a supermarket. We are open to the public 6am-10pm Monday-Saturday and 11-5 Sunday.
The major stock deliveries arrive at any time between 5-8pm, where the pallets of products are unloaded and put into our warehouse. We also get fresh/frozen deliveries in the early hours. At 8pm the night staff arrive and spend the first hour of their shift getting their aisles prepared. At 9pm the first pallets will be dragged out to the shop floor and the night staff will break it down, taking stock to the relevent aisle. When the store closes to the public that's when they can properly start work, getting as much stock out onto the shelves as possible.
At 4am the Home Shoppers arrive. They will get a home shopping trolley, a handset and start the first of their picks for the morning deliveries/collections. By this time most of the night stocking has been done and so the shelves are full and the aisles are clear. Between 4-6am there may be points where night staff are putting things on shelves and pickers are taking them off within minutes so it does feel like an endless task, but then that's the stockers job, to replace the things that are being bought. They also try to get all the ambient products out before 4am so that the home shoppers can be picking those items while the night staff restock the fresh/frozen products (which came in overnight) so they aren't on top of each other.
As much as we would love to have the pickers finished by 6am when we open to the public it just isn't physically possible - they can't pick the tens of thousands of products needed every day for deliveries in the 2 hours between 4am and 6am but they can't come in earlier as before 4am the shelves haven't been filled so you wouldn't get half your shopping and the other half would be substitutions.
It's all down to logistics and home shoppers are 100 times faster than customers as they are timed, have pick targets, have deadlines (if a van has to be out at 6am then the pickers can't still be on the shop floor at 5.58) and have a handset that not only tells them the exact item and quantity but also tells them exactly where it is located (aisle/bay/shelf) and each individual pick list is generated in a specific order to maximise efficiency so pickers work from one end of the store to the other, don't need to double back and pickers will all be given different starting point so that they aren't all in the same place at once (eg Jane will go Aisle 1,2,3 ... 30; Jack will go 3,4,5 ... 30,1,2; John will go 5,6,7 ... 3,4 etc)