I believe this is a city thing. We have the same back home in Ljubljana.
The social contract in cities seems to be one of politely ignoring each others’ existence.
In cities the friendliness is missing because you don't need to rely on others for food/water or anything else, you can just purchase it nearby.
When resources run out that's where the social contract becomes more social.
Camping trip and need a match to start your campfire? Your neighbor will happily chat with you.
Power outage. People on the street become way more friendly.
Transit failure. People are more likely to help arrange transport or chat as they wait.
Snowstorm snowed you in. That's how you meet the new neighbors who are also out shovelling.
In a city, the limited resources are emotional/social energy, sense of privacy, etc. So the social contract is to conserve them by politely not noticing each other; thereby allowing people to maintain the reserves necessary to get through the day.
I've lived in LA for over 25 years. I think part of the reason things are like this is that the sheer amount of people here make it hard to know if you are dealing with a person who is going to end up being a nut or not. This town is also full of narcissists and leeches who want to use you. I've let people into my life that I seriously regretted later. After enough of those you start getting more cagey. It's a shame really. Whenever I go somewhere else I am reminded how much more genuine people can be and how I need to be more mindful of what I say. Words hold a lot more power outside of the LA bubble. In a funny way we are much more like the British in this way.
For example, locals know not to make eye contact while out and about. Not because we are dicks, but because if you happen to lock eyes with someone, theres a non zero chance they're gonna attack you or ask you for money etc. Take a ride on public transit if you don't believe me.