Something I didn’t know about the army before I joined, but which they told us from the start, was that any misdemeanour serious enough to go into custody (known as the “cachotte”) while in the army would end up giving you a criminal record. Which clearly is not a good thing to have for young people who still have to find their way in the job market.
This is probably intended to make sure that discipline in the army is taken seriously. So things like insubordination, violent behaviour or in general not following the rules (e.g. when you’re supposed to be on patrol, or inside the barracks, or in bed after lights out) could result in disciplinary action. Depending on the seriousness of the offence, or even a high frequency of lesser offences, this could lead to spending one or more nights in solitary confinement, and an entry on your criminal record.
So, to be clear: this is the type of offence that in civilian life might cause a ticking off by the police, but would not land you in jail. It’s only the type of offence plus the fact that it was done in a military environment that made it a crime.
Fortunately I was never in danger of a criminal record, but I’ve seen someone get a night of solitary confinement because he reacted to someone egging him on. And since he already had a record of not following the rules that religiously, that was the straw that broke the camel’s back. Fortunately for him his job was doing the rounds of the markets, which he was already doing anyway and where an entry on his criminal record didn’t matter all that much.
Still, it adds to the feeling that you keep your head down in the army and wait it all out until you’re discharged.