Answer:
The phrase means that even if the action was or seems wrong, the outcome or result means it was not really wrong. The phrase strictly, applies to cases where the moral outcome is truly superior to no action. Otherwise the end would not truly justify the means.
The answer you're probably looking for is:
The Stamp Act of 1765 was significant in the sense that it was the first direct tax imposed on American colonists (So,
would most likely be the answer that you're looking for to this question, that you have asked

When President Truman took a hard line against striking workers in the years immediately following World War II, he:
"had little understanding of the plight of laborers in the post-war years."
During the first months of his administration, he became involved in a struggle between coal miners and railroad workers. It took several meetings, and fierce arguments, to get them to agree, and end the strike.