There is a middle ground...that they work, but only a little. Also 2 other notes: we know that flu is spread through fomites as well which may actually make masks less productive, because people have a tendency to touch their face. And 2, that not all masks are created equal. So if you are sitting next to someone ill with COVID on an airplane for 7 hours, even that N95 isn't going to protect you (because it is only 95% effective and you are being exposed multiple times over time to infectious events), but if you are seated 10 seats away maybe it helps. If you are wearing a cloth mask and are presymptomatic (the number and time of truly presymptomatic people is limited but human beings have a tendency to shrug off things like a tickle in the throat or a runny nose as "allergies" at first and to stubbornly refuse to believe they are falling sick) and you need groceries so you go to the market, that cloth mask may prevent you the first time you cough from infecting the lady walking past you, but once the thing gets wet and germs build on it, isn't going to do anything for the poor clerk you just sneezed on while he's packing your bags dislodging the viruses embedded in the cloth. 3rd side note: it's why doctors in a hospital setting change masks multiple times, to keep them dry and fresh....unless there's a shortage they don't reuse.
So if it's possible they help a little, the next question is why were they oversold. Why did people say "masks are better than vaccines" when clearly from Fauci's emails we know he didn't believe that and there wasn't some shocking revelation in some scientific study that suddenly said they work. There are a lot of reasons: politicians were desperate to say something work, medical experts were desperate and so said why not since there was very little cost in doing so (at least temporarily, though there is a bit of an environmental reckoning to come), you needed to make those with phobias feel better, they were a good way to signal you were pro-science and pro-virtue. But the biggest reason in the end comes down to essential workers....they needed to prevent a panic in the essential workers and didn't want to send them out there with nothing that helped....without them the supply chain would have completely collapsed, especially in very dangerous environments like meat packing plants....so they oversold it, to prevent a situation like Contagion from happening (even though this virus was no where near as deadly as Contagion, but (for numerous other reasons) they had already oversold the virus as a killer virus that was going to wipe everyone including children out....what was the last survey....65% of Ds still think we should have lockdown restrictions???)