Which is why it's illegal now. It's one of the only ways you can really get out of boot camp once you're there. You say, "Judge So-N-So told me to enlist or go to jail" and the DIs have to run it up the chain.
So you get dismissed from the Military and go to jail
The conditions are generally set that unless you complete your military service in good standing, you go to jail. It's a win-win really. That said, a lot of gang bangers are sending members into the service to learn combat strategy and what not. It's becoming far more common than anyone would have suspected. There's Blood, Crip, MS13, Latin King etc... gang signs showing up in Afganistan, Iraq and other countries where our servicemen are located. The military apparently has had to add that as one of there background checks. You probably know more about that than us Slate.