With or without headphones, the only strangers who come up and talk to me are people who want something from me, like beggars, people seeking directions, or people trying to sell me something. As someone who's not very social around strangers, I rarely initiate conversations with strangers myself.
Listening to my own music just makes getting through the world more pleasant for me. It doesn't make me significantly more isolated.
For example:
> The results showed that those asked to chat felt far more positive about their journey than those who kept to themselves, and that the longer people talked for the better they felt.
A world where the only people who talk to you outside your fortress are beggars, scammers, and salesmen is a sad one. Not to say you're always ready for a conversation with a stranger every time you leave your house, but there is also a chance of serendipity in the most unlikely exchanges.
I met a woman I dated for a year at a supermarket. This woman next to me was spending a lot of time comparing fruit, like gently tapping them and squeezing them. She hadn't even put one in her basket yet. I stood across from her and put some plums up to my ears as if to listen to them, mockingly, which started a conversation that we picked up that evening at a bar. It's something I think about when I err on the side of not interacting with those around me since it was a bit out of character for me.
It's one of the spices of life.
Granted it can be very emotionally draining.
There are loud bars/clubs you go to with your friends at times when you want to let all your energy out and just drink, dance, and listen to music without having to worry about carrying a conversation.
There are also quieter and more fit for socializing bars and music venues, where you wanna go to shoot shit with the bartender, have a conversation with your friend you haven't seen in a while, or just relax and talk to people in your neighborhood who tent to visit that place often while chilling with a drink.
And I love the fact that in most cities I've lived in within the US, there are plenty of both, because I definitely like to utilize all of those options. More choices is always better.
The only example of yours I heavily disagree with is the gym one. It isn't a proper place for socializing imo, assuming you are talking about the weightlifting/cardio stuff. Team sports areas like basketball court or a soccer field (where I see a LOT of socializing happening) are a completely different story, however.
In the US maybe. In other parts of the world it can be quite different...