Interesting. It has been standard procedure in most industries for decades that if you're going into an area where the use of a breathing apparatus might be necessary, men (and women, I suppose) must be clean shaven so as not to interfere with the fit of a face mask. As recently as last year I had to have a fit test for a full face mask before being allowed onto a major construction site. Same when entering the bleach plant at pulp mills, firefighters, rescue workers, confined space entry, etc.
In the case of pilots, containing enough oxygen within the mask might be possible with a short beard. Keeping toxic gases out would be a different matter. What if there's a fire on board?