That's only because of policy - there is no legal backing for, or against it. The policy's only in place because there's no shortage of able-bodied men.
Once things get grim enough, the army will take anyone. Towards the end of the second world war, the Germans were drafting children and old men.