Shouting that while traveling too fast is indeed incorrect, but a polite "on your left" or bell while traveling an appropriate speed is considered good behavior to avoid surprising pedestrians.
also - even though the pedestrian has the obligation to move over - a friendly thanks! or thank you! helps all cyclists in the long-run.
Outside of some stage actors and drill sergeants, there are probably few people who can project their voices well enough that a vocal warning is useful.
You're either traveling slow enough that it's not necessary (and why yell at people if you have to?), or are too far away for someone to understand and get a bearing on who isn't already looking at you.
A bell is still rude in a shared space but used correctly, a decent one can at least be effective.
The problem is there's a good number of people that hear "on your left" and shift left.
A gentle bell mostly doesn't do that.