There was an extremely brief period where public health advice discouraged the general population from masking. This was because there was a huge undersupply for medical workers and because we hadn't fully figured out whether covid aerosolized mere weeks into the pandemic.
Once we had a bit more information in a rapidly evolving situation public health advice switched to recommending masks and stayed that way for years.
We cannot possibly expect public health advice to get everything right immediately during a once-in-a-century pandemic and this error should definitely not be used as a general "wow public health officials are dumb idiots or engaged in a malicious conspiracy", as this error is often used.
There was indeed a huge undersupply for medical workers. The appropriate response from public health officials should've been something like "surgical masks help protect others, and right now, we need to protect hospital patients", not "we want to keep masks available in hospitals where they're needed, because they're important, so let's tell people they're not important to make sure they're available". This is the kind of plan that would be used as an example of Adults Are Useless in a children's novel (ref: https://tvtropes.org/pmwiki/pmwiki.php/Main/AdultsAreUseless): it was never going to not backfire. (Does it even count as backfiring if you point the gun at your foot, and lean down to watch it go bang?) Institutional dysfunction can produce decisions that no individual would ever author, but there's a reason the Evil Overlord List has #12:
> One of my advisors will be an average five-year-old child. Any flaws in my plan that he is able to spot will be corrected before implementation.
And… it's SARS-CoV-2. Of course it aerosolises. The "we hadn't fully figured out" was sheer incompetence (see doi:10.1080/02786826.2024.2387985); just like the "we aren't sure whether it's reached our jurisdiction yet, so be vigilant", "oh lots people are showing symptoms", "actually turns out it reached us 3 weeks ago and is now endemic, haha oops" pattern we saw playing out in country after country, region after region, while open source intelligence collated on LessWrong obviously showed what the governments apparently could not see until tens of days too late. "Paranoid" early lockdowns could've lasted two weeks, allowed us to identify who was affected, and then allowed us to give them top-of-the-line isolated care while they recovered, and while the rest of the region got back to doing an economy. Instead, COVID-19 is still claiming new victims today.
Australia managed it, and everyone could've copied that, but they didn't. China could have managed it right at the start, and saved the world, if their accountability culture hadn't favoured a cover-up. (Their belated attempts to pursue a zero-COVID strategy were not particularly effective once it was a global pandemic and multiple strains were circulating, because it turns out you can't persuade people into not being ill; and sealing residential buildings is neither necessary nor sufficient contact tracing / isolation.) Zero-COVID would've been feasible as a global strategy, even starting as late as February 2020, if not for all the politicised bullshit. (No, "don't kill your neighbours by giving them a novel respiratory virus while all the hospitals are full" isn't authoritarianism. Sensible precautions are not setting a bad precedent, because it's a conditional precedent: if we were to wipe out the disease, there would no longer be a reason for those measures. In fact, the cryptographers figured out how to do privacy-preserving contact tracing, and shipped the protocol very quickly, so that the best available system was inherently anti-authoritarian.)
While I wouldn't use the phrase "dumb idiots", public health officials are, largely, responsible for long-term policy decisions, not rapid response. (If a response to a seasonal respiratory disease fails, you've usually got 8 months to put together a better one.) They had had little practice making the snap decisions, and they almost invariably made bad ones when it mattered. Replacing soap with diluted alcohol gel at handwashing stations, for example, is stupidity. Soapy water is one of the most effective anti-coronavirus measures disinfectants there is. A roughly 70% alcohol solution is a close second. (There are viruses that are not denatured by soap, for which alcohol is a much better disinfectant: I can only imagine that people got confused.) 30% alcohol solution is basically useless. Alcohol gel is useful because it's portable, but it's not as good for removing SARS-CoV-2 as washing your hands with soap and water.
So many resources were used (and entire supply chains were established!) ensuring that every surface is wiped, even though it's a respiratory disease and surfaces were not a major transmission vector; but very few resources were employed to ensure sufficient ventilation which, again, respiratory disease. It does not take a genius to make the link between "it infects your air holes" and "we should ventilate or filter the air". (Yes, I witnessed many people closing windows using the disinfectant cloth as a glove, to avoid touching the handle, right before filling the room with occupants.)
We were not prepared for the pandemic that happened, and I will condemn that, because are we going to do any better next time? Have we put measures in place to ensure that accurate information about the disease, including appropriate disease-specific hygiene measures, are rapidly disseminated? Have we ensured that international authorities and the populaces will calmly overreact, because overreaction is cheap and allows each patient to receive specialist treatment and maybe lets us wipe out the disease entirely? From where I'm standing, the WHO is weaker than ever, we've traumatised a generation to the point they'll resist any attempt to impose another lockdown (even though acting early means it might only last a few weeks, or even a few days!), and we've gained a political playbook for profiting from pandemic denialism.
A once-in-a-century pandemic should be expected to happen once in a century. Allocate a hundred people around the world whose jobs it is to know how to deal with that, and then listen to them if the rare event shows up. It's not conceptually difficult. That this is difficult for us in practice is damning.