Definition of necessary evil in US English:

necessary evil

noun

  • A person or thing which is undesirable, unpleasant, or inconvenient but ultimately useful and therefore to be tolerated or accepted.

Origin

Mid 16th century; earliest use found in William Baldwin (fl. 1563), author and printer.