Traditional murder mysteries are interesting because they're ostensibly about a horrible thing - murder - but underneath that, they're about restoring order to a messed-up world. By the end of a whodunit, the detective has taken the reader through all the reasons why this terrible thing happened. Through that explanation, and by seeing the killer captured, the reader feels a sense of catharsis.