Military guys have to be clean shaven, I think. Wearing a beard is slapping the military authority in the face or showing disrespect.
Like court rules that forbid men wearing hats in the court room or a no jeans rule. I think forcibly shaving him is fine. It's just a beard. And those are the military rules. HE chose to join the military.