They didn't. The point is that they stop you from giving covid to other people.
You do realize that masks would help prevent you from getting covid if other people are wearing the masks, right?
The comment just talked about masks, not whether you are the one wearing the mask.