I think it was a product from a different era. When Prime Pantry launched, Amazon hadn't acquired Whole Foods, and they didn't have a story for last-mile delivery yet.
So they had to ship your order from a warehouse, and the only way to do that profitably on low-margin grocery items was to batch them up into a large order in a box of uniform dimensions.
The fact that they no longer need to do this speaks to how far Amazon's logistics have come over the last 7 years.