Something that is undesirable but must be accepted:for many, paying taxes is at best a necessary evil...
In fact they enter the course regarding cryptography as a necessary evil that must be endured in order for them to obtain an Information Security qualification.
If this was making inroads into the problem then many Americans would reluctantly accept this as a necessary evil.
But if lights are occasionally necessary, they are a necessary evil.