Before grocery stores, meat and produce were sold in farmers' markets or at specialized establishments like butcher shops and bakeries by traveling salesmen or street peddlers.
Over time, general stores popped up to concentrate goods and wares in one location, especially in rural areas that weren't large enough to support many individual merchants.
Even when different types of food began being sold in a single location, the items were stored out of sight. The clerk would fetch and deliver customers' desired items.
Thus, customers wasted time waiting and had little agency over their final orders as they didn't know what they were getting until it was handed to them.