Whodunit necessity (6)
I believe the answer is:
motive
'whodunit necessity' is the definition.
(I've seen this in another clue)
This is the entire clue.
(Other definitions for motive that I've seen before include "Reason for doing something, perhaps a crime" , "What induces one to take a certain action" , "Purpose in doing something" , "Underlying purpose" , "Reason (for acting)" .)