Let me start by saying I'm not an expert and I didn't do any research for what I'm about to write, so I could be completely wrong. 

It's my understanding that humans spread germs to each other through their face holes.  People talk, whisper, laugh, sing, yell, cough, sneeze, and do a variety of other things to propel germs out of their bodies and into the bodies of the people around them.  It's disgusting. 

It seems to me that anything that can possibly prevent this from occurring is probably a decent way to reduce the spread of germs.  That could be
  • physical separation, i.e. distance
  • a solid barrier, like a wall or window
  • a flexible barrier around each person, like a bubble suit
  • a face shield like a welder's mask
  • a mask covering the mouth and nose
Somewhat obviously, a wall is a better germ barrier than a face mask.  But a mask still does something, albeit less than some of the other options.  Some mask materials are probably better than others, but I would imagine any mask is better at preventing the spread of germs than no mask at all.  Doctors and nurses and dentists have known and practiced this for decades (at least). 

There was talk early on in the pandemic about whether or not masks are helpful at all.  And there's been talk more recently about which mask material is best.  The LA Times actually has a good writeup of the CDC's history of discouraging and then encouraging mask use throughout the pandemic (whoops).  I would estimate, again not an expert, that masks are and were probably helpful at reducing the spread of Covid. #science