Eagle pretty much nailed it. I was in when the military was probably at it's leanest, they were looking for reasons to kick people out, and paying people to leave. And even then there were a lot of criminals in the military, even though most of them would be kicked out within their first year. I could recount lots of anecdotes. Soldiers robbing banks in their BDUs with their name tags on, seeing a soldier from my battalion on cops, wife beaters, child beaters, rapists, child rapists, gang leaders and crank dealers.
I will say that the vast majority of gangbangers were in remf units, since those types generally eschewed combat arms jobs, and remf MOS's were easier to get.