I'm not saying the OP's story is true but;
My first supervisor in the AF, 1983, had a similar story. He was in front of a judge for something, I can't remember what and judge said "Military or jail. What will it be"? He chose the AF and had a long career. Security Police by the way!
The military can straighten people out if they want to be straightened out.
I'll tell ya right now, it's NOT true. Even in this day and age of "lowered standards" (liberal's phrase, not mine), we can and still do PRC's (police record checks), and did so even when I was recruiting 10 years ago.
If ANYONE came into ANY recruiter's office with a piece of paper or orders from a judge saying "military or jail", we'd tell them, "Have fun in jail." Any such agreement is automatically disqualifying for all programs, all branches of service, period, regardless of charge.