When I was drafted (involuntarily) into the Israeli Military, I worked as a programmer. It's much cheaper, you see, to have a programmer who doesn't get paid - assuming you can filter our those teens who are good enough to be able to do the job.
Now, I was only 18 years old. During my military service, my political consciousness developed, and I started thinking about what the Israeli military was doing with the product of my work, and for what purposes. I also became quite critical of the various foreign clients of the technology we were working on. It got to the point where I not only thought what my unit was doing was illegitimate, but in fact, I lost my support for the regime.
So, I quit. The thing is, quitting mandatory military service is a bit more difficult than quitting a civilian job... and in order to quit, I had to go to prison. Or rather, officially, you can't quit, you can only be discharged; and for that to happen you have to resist enough for them to believe they won't get any work out of you, and then they typically discharge you for "inappropriate conduct", or for being determined to have an (inspecific) psychological problem.