Loneliness comes from a lack of community and people who you can trust. You will not build a community and find people who you can trust through small talk and involving yourself in groups that are based on transient interests that can be changed in an instant. There is a reason gangs and groups have some sort of hazing and acceptance ceremony.
I agree, I have never made a long standing connection with someone I've met while going to a store in a city. I've gotten to know store owners for stores I've frequented over years but not just randomly running into customers. It seems like most cities I've lived in you don't really just start talking to people randomly, maybe I'm just not very friendly but it seems like a survival instinct to avoid crazy folks.
My wife said such a thing would NEVER happen in New York, there’s just too many people.