All this aside, I will state that modern military grooming standards for the U.S. Military are quite silly. I know it has to do with sanitary standards and I know every Sgt.Maj. will pace around and point and scream just to keep a soldier's mind off warfare and on trivial matters to instill discipline. I understand the attention to detail aspect is highly important to any well trained unit. Regardless, having served in Germany and watching German Army troops walk around with facial hair and hair on their heads which would incite a riot in U.S. posts everywhere, I find it all ridiculous. Even the Special Forces soldiers, who routinely must blend in with their environment, typically grow beards and have unkempt hair --are they any less disciplined? We do have a TON of gang bangers and low IQ types in the military today, those of which would not have EVER made it through boot camp in the early 90's when even I went through. The boot camp of today is a JOKE. However, all this said, if an officer (especially of your command) gives you an order to shave...DO IT.
The facial hair requirement is more about being able to get and keep a seal on your gas mask than anything else, as for the hair, I can come up with a lot of good reasons, but they all go out the window because they don't make the women keep their hair cut to the same standard so they all go out the window.