Sure, they're not the only way - but they are definitively the best way, and nothing is stopping this kind of study from happening, especially in low risk (age) groups / populations.
I think it might even be ethical if you could find such a low-risk cohort that was adamantly opposed to the wearing of masks, and under no circumstances whatsoever, except perhaps because they are scientific minded individuals and would like to prove they are not required, would wear them.
Given other beliefs those people are likely to hold, at least here in the US, I suspect there would be some other behaviors they would be systematically more likely to engage in that would act as confounds.