> Initially, the CDC refused to recommend wearing masks to inhibit virus transmission because there weren't rigorous studies supporting that usage.
> nobody was willing to run a study where you exposed half the subjects to a virus without any protection
Running the studies is effectively impossible due to ethics constraints. The CDC were probably lying about their reasoning because if you put all these facts together the CDC would not ever be able to take a position on countermeasures until it was clearly too late. I dunno what their idea of Disease Control is for pandemic, but a little bit of "balance of probability" thinking probably happened.
Even if we'd discovered masks were a complete waste of time, the cost-benefit of everybody spending $10 for hastily sewn cloth mask was clearly in favour of recommending the idea. We've had entire economies parked up, I'm sure the labour could have been found to do some knitting. As projects go it would have been a very productive use of time. They just didn't want to disrupt the supply of medical masks and showed a rather dire level of panic and unpreparedness.