As I remember it, the advice wasn't "don't wear masks," the advice was "stay home." If they said "go buy masks," that would mean leaving your house to get a mask, which would directly contradict the more important advice of staying home. Also if they said wear a mask when you leave the house it would have been interpreted as "it's ok to go on with normal events as long as we have masks" which wasn't the message they were trying to send, either. The message was stay home, and at the time it was probably the right message, and not a lie.