Also, five years seems a bit on the lenient side. Compare to what Cyrano Jones was facing.
KIRK: No, you're not. There's something I want to show you. You know what the penalty is for transporting an animal proven harmful to human life?
JONES: Captain, one little tribble isn't harmful. Captain, you wouldn't do a thing like that to me, now would you? Would you?
SPOCK: The penalty is twenty years in a rehabilitation colony.
The Federation seems to take threats to democracy in stride.
I see Kirk and Spock took some pages out of the Judge Dredd play book.