Masks DON’T work in hospitals, unless they are fitted masks with gloves and other protective gear. And you need to change your gloves and masks regularly.
They are worn to prevent blood getting in the wearer’s mouth, or to prevent snot or mucous from dripping on the patient. If there is a significant risk, then strict procedures are in place along with fitted masks and otehr protective gear.
Lots of studies were done before the Chinavirus and before masks became a political magic talisman. None showed surgical masks prevented viral infections in EITHER direction.
Nurses entering a room with a flu patient don’t put on a surgical mask to do so.
And surgery is an altogether different kind of beast. People’s innards, which aren’t normally meant to be exposed, are opened up. Of course you wouldn’t want germs of all sorts in innards, not designed to handle them.