 They went to a planet where a good Federation officer had been sent to calm things, organize society. But then, after a couple years, the messages they were getting back from that planet were wrong. They were concerned. So Kirk and Spock went there, and they found that it was a sort of dictatorship.