I remember asking my dad (who was a doctor who performed surgeries - mostly c-sections and appendectomies - often) about masks, and his answer in the early 80s was interesting:
“It’s mostly to prevent me from getting spit into open wounds and incisions when I'm talking or I have to sneeze or cough. Bacteria is a real problem, and the mask stops that.”
I never really thought much of that until recently.