If the virus is in microdroplets in your breath, something in front of your face when you breathe out is going to slow some of those droplets down, making them less likely to be inhaled by others nearby. This is just physics. If it can fog your glasses its helping. If it makes you smell your own breath its helping.
A scarf is better than nothing, just like a homemade mask is better than a scarf, just like a purpose built mask is better than a homemade one.