A good outcome excuses any wrongs committed to attain it. For example, He's campaigning with illegal funds on the theory that if he wins the election the end will justify the means, or The officer tricked her into admitting her guilt—the end sometimes justifies the means. This proverbial (and controversial) observation dates from ancient times, but in English it was first recorded only in 1583.
The American Heritage® Idioms Dictionary Copyright © 2002, 2001, 1995 by Houghton Mifflin Harcourt Publishing Company. Published by Houghton Mifflin Harcourt Publishing Company.