When you inducted into any branch of the military you raise your right hand and take an oath that places yourself under the Uniform Code of Military Justice and for all intents and purposes give up all your rights given under the Constitution for the duration of your enlistment.