It's not so much about them leaning across as touching the food that bothers me. How do I know they haven't got some disease that they're about pass on to me via the food in my trolley, especially if it's fresh and unwrapped.
I suspect, though, that the behaviour is a throwback to the days when we were hunter gatherers. Animal instincts, as it were. You've killed a pig and there's plenty to go round and plenty more out there for the taking, but there's no way you're going to give up your precious spoils to anyone. In these times when privacy and security is becoming a luxury then we feel it more than ever.
Mind you, the woman I encountered today was just plain rude. I was about to step across to the coffee shelf to take what I wanted when this woman with a trolley comes wandering along, having just taken a large jarof coffee from further along the aisle. Thinking she was planning on ambling past, I stood back to let her pass. Ignorant bovine female stopped right in front of me to recheck her shopping, meaning I had no choice but to reach over her trolley to get what I wanted. Dozy mare never even looked up.