Common sense would lead me to believe that if someone’s cough or sneeze is held back by his/her mask, that is doing something to prevent the spread.
Whether or not the mask is protecting the wearer in an environment where others aren’t wearing them is a different story; most masks clearly indicate they WON’T protect you.
Wearing a mask is about protecting others. You need a really carefully fitted mask for it to do any good at all in protecting you, but even a crappy one does *some* good if you sneeze, cough, or breathe hard.