Oh Mary just gave birth, Henry is currently sick, Walter likes his coffee a little stronger, James a little weaker (something with his stomach). Danielle drinks only tee, has two kids and the marriage is not really happy. And so on. A lot bordered on gossip, a lot was very valid and relevant information. People talked.
So it was totally normal in a smallish community for the store owners to have an extensive profile on every customer. All in their head for sure, but non the less. And guess what - everybody benefitted. The clerk could recommend based on what he knew. People would be directed to relevant produce.
By the way this works even today. If I buy at my normal place I get personalized recommendations for cheese from the lady behind the counter. We talk, she knows a little bit about my tastes and I get to try new things.