In my job as a pest control technician, (posh term for rat/ant/cockroach man!!), I am required to be clean shaven. It's even written into the terms of my contract of employment.
The reason is so that my half and full face masks seal thus keeping fumes from insecticides and dangerous gasses such as aluminium phosphide getting past.
It would seem that this "rule" has somewhat gone by the wayside recently with the popularity of growing beards, mostly among younger members of service staff.
With regards to soldiers having to be clean shaven, I reckon it's a control thing.
Armed forces need discipline, and daily ablutions are just another way to control those at the sharp end. (Just my opinion)