The masks work both ways. Obviously, they're to protect people from the virus, but they also help you from accidentally ingesting droplets or things like that. It also helps with the little touches to our face we sometimes do without thinking. Without wearing a mask, you could be giving yourself coronavirus from hand-to-mouth. With a mask on, it's covering your Mouth and nose, so if you go to touch your face, there will be a protective barrier already in place.
And yes, it does only truly work if everyone is wearing one, but you're still safer with one on either way. Especially since you can be asymptomatic with the virus, you may be a carrier and never know it. Wearing a mask stops super spreaders.