Idiom
the end justifies the means.
something that you say which means that in order to achieve an important aim, it is acceptable to do something bad.Unfortunately, we'll have to cut down the forest to make space for the golf course, but I feel the end justifies the means.