There's some serious stuff brewing under the surface of the Federation we see in TOS.
Commit a crime and they send you off to an asteroid someplace to make your mind right. Okay, the guy we saw using thew machine was kind of screwed-up himself, but still. Someone somewhere in the Federation government thought this was a good idea to begin with. That's pretty freaking scary if you ask me.