Here's an example, which I think is what Kodos the Executioner actually did. You have your world thats on the brink of starvation. They are all going to die if you don't find a solution. You could change farming techniques to increase food production, but that takes time. So the quickest solution, and therefor the logical choice, would be to kill half the populace. Just line them up and shoot every other one. That way demand for food is decreased immediately. Although your people might find it evil, you've just made a logical choice.
Well, not really. Unless the timescale worked out just right, Kodos would have had to kill all the people before there was hope of more food. Or then he wouldn't have to kill anybody, because people could easily survive with zero food for several weeks. And there is no indication in the episode that Kodos would have been facing the right sort of time window. Rather, he just made flimsy excuses for satisfying his murderous urges.
Timo Saloniemi
When Spock was explaining the massacre to McCoy he said that food transports were due to arrive within months. Kodos calculated that with half the colonists gone the food supplies would last until then. The transports arrived early however, and the deaths accomplished nothing.
On a side note. Does it seem odd that a man could be the governor of a Federation colony world yet only seven people had actually laid eyes on him. The ep implies that anyone who had seen him was killed, but there were four thousand survivors (based on 4000 colonists killed and being described as half of the colonists), you would think a few more people would have seen him.