I worked with someone long ago that was given that choice: jail or the Navy. He took the Navy.
He came out of the Navy with an education, and had a decent job as an electronics technician.
Sometimes, it works.
Yup.
A distant relative got caught up in this situation.
He got a damned good education in the Army (radio) and after his service, started his own business, had a family and retired well.