When the classical utilitarian approach is applied to such a question, it is possible for an ends to justify any means of achieving it. Given that they may see achieving happiness (pleasure) as the main target of life and government, as long as the end result is a greater level of pleasure than the suffering caused through the means then it could be justifiable. An example of this could be seen in the justice system, with an end result of small increases in pleasure for the general public justifying a life-imprisonment (no matter how much suffering that causes) for a murder.
An end result may sometimes seem desirable enough to justify
any means of achieving it, but to consider only the end result oversimplifies
the problem of finding an ethical way to behave. If someone does evil so that
good may come, their act is only successful if the good outcome outweighs the
evil intermediate act. Yet it is actually impossible to know what will
ultimately come of any act. It is only possible to decide to try to act for the
good. This too can be a hard decision, but at least it gives the decider hope
of acting ethically.
It can be gratifying to achieve a fantastic outcome, or end result. This outcome, however, is not the only important consideration of a matter. As they say, the largest part of a journey is getting there. The unintended consequences of actions taken along the way to achieving an outcome can have much larger and far-reaching consequences than the outcome itself. Therefore they must factor at least as much, if not more, than the outcome. The means usually are more important than the ends.