I am with you on speakers on a nature hike, but I think the line blurs a bit in a city context. As long as it's not extremely loud, I find it slightly more difficult to hate on the person playing some music and moderate volume while trucks and loud motorcycles go by. If we had less of a car culture, I might feel differently about it, but there's so much noise already that in that context I kind of shrug my shoulders at it.
In a city context it's still obnoxious. In my experience these people are playing their music loudly. Like you can hear it from 2-3 blocks away, even with vehicle noise.
And the vehicle noise is expected and "necessary", in that it's a street, and of course there will be noisy cars and motorcycles on it. The noise is also easier to treat as a background buzz and tune out. Loud music is not any of those things.
Cities are a delicate balance when it comes to noise: if you live in a city, you have to acknowledge that you're living in a densely-populated place with lots of other people around, and make your peace with the fact that there will be noise. But at the same time, each individual should also do their best to avoid polluting the air with unnecessary noise. And blasting music from a giant bluetooth speaker in a backpack is 100% unnecessary, rude, and selfish.
TLDR it feels better to announce yourself with some (non aggressive) music than triggering a bell.
I wouldn't use that when hiking but it is true that I sometimes use a bluetooth speaker when riding my bicycle in the city.
I don't put it at full volume but a lot of pedestrians and their dog seem to be attracted by dedicated bicycle lanes when they are built on the same level as the sidewalk.
It is a good way to warn people of my presence without using a bell. Using a bell sometimes sounds a bit rude because people associate it to the use of the car horn which has become a proxy for insults instead of the warning device it used to be.
[1] I used to think pedestrians were doing it to annoy cyclists on purpose but judging by their often suprised reaction. I think it is just an unconscious behavior. Apart from bicycle lanes which aren't well marked, it is probably because the bicycle lanes are usually a smoother surface and thus more agreeable to the feet than the sidewalk thus people tend to walk on them natually.