There are multiple categories for how those folks got in and how they got out:
1. Lowered recruiting standards for "bodies" meant we let in folks who were at a higher risk for committing misconduct. We see that today because our annual crime rates are lower and lower compared to the time period involved. So are our discharges and courts-martial. This category is unfortunate because we set them up for failure, but inherently another argument is that they were given a chance and failed.
2. A desire to get rid of folks quickly. Courts-martial are slow, administrative discharges/procedures are much faster. Crimes that might ordinarily be a low-level court-martial were handled as administrative discharges. You get rid of the Soldier faster and you get a replacement faster. This is a mixed group, some from category 1 and unfortunately some from the next category.
3. It is absolutely true that the military had and to some extent still has a responsibility problem with as you say breaking Soldiers and then dumping them when their utility goes away. There is also the mental health stigma that has not gone away. PTSD does not lead to every crime of course. It doesn't cause you to steal for example, but it certainly can lead to drug use, alcohol use, and domestic violence. One of my JAG brethren proposed a special system that was a hybrid of judicial and rehabilitative for PTSD Soldiers who committed misconduct. Unfortunately, while hailed as a great idea, it hasn't really gone anywhere.