Outcome bias is a cognitive bias which refers to the tendency to judge a decision by its eventual outcome instead of judging it based on the quality of the decision at the time it was made.
"The ends justify the means" is an often used aphorism to express this when the outcome is desirable.
Probably the best examples are the various justifications for the Iraq War which appeared after the event.
 See also
| Articles about logical fallacies|
|Affirming the consequent||Denying the antecedent|
|Fallacious argument styles|