Except viruses are not floating around by themselves. They are inside a bubble of moisture (water, phlegm, or whatever). The droplets can hugely vary in size. Masks can in fact capture the droplet infection source which maintains the virus.  Is it great protection? No. But they can in fact be mildly effective. This combined with handwashing can go a long way.