The term DINOS: Dogs in Need of Space was created to help the public understand this: All Dogs have a need for and a right to their own personal space.
As long as they are being properly managed by their owners, Dogs have a right to enjoy a leashed walk in public, even if they don't want to say "hi" to you or your dog.