Unjust or immoral actions can ultimately have on balance positive ends. What you decide to do is a matter of your philosophy, but in most significant cases none of your choices are completely moral.
Choosing to turn 10,000 people into ‘pie’ would seem a fairly black and white case. Do you think it possible to justify? You don’t seem whole against it.
I’m not saying it’s moral. Obviously I would prefer my government to not do this sort of thing. But I am saying that the motivations are understandable with historical context and that the legitimacy of a government’s decisions go deeper than just a binary good or bad judgment; and that all governments face these sorts of decisions at some point. For instance, any time the USA intervenes militarily or economically elsewhere, it is an unavoidable calculation that some (potentially large) number of innocent people on those countries will suffer or die. To ignore the obvious example of all of America’s armed conflicts since WWII, embargoes on North Korea, for example, have likely lead to a huge amount of suffering and death in that country, but our governments have deemed it worth it to some extent. How do we make decisions in these cases?