It seems to be that people just don't really look where they are walking or want to be getting anywhere when they are walking.
I have a very mild-mannered friend who deals with this problem. When people are not looking where they are going he plays a fun game.
My friend sees a person with the head buried in their phone or gazing off into the distance and walked towards them, gazing off into the distance.
They never walk into him. I tried it and found it to be a great deal of fun.
Similarly if there are three or four people obstructing a doorway then it's them being the rude ones. I found that "excuse me" is a little too nice, and that a cheery "coming through" gives me the chance to communicate what I really think. But I think that often the subtlety is lost.
But at least I had some fun.