The 3 elements of a WHYDUNIT story are:
1) The detective does not change, we do; yet he can be any kind of gumshoe—from pro to amateur to imaginary.
2) The secret of the case is so strong it overwhelms the worldly lures of money, sex, power, or fame. We gots to know! And so does the Whydunit hero.
3) Finally, the dark turn shows that in pursuit of the secret, the detective will break the rules, even his own — often ones he has relied on for years to keep him safe. The pull of the secret is too great.