While Twin Peaks is a web of contradictions—combining as it does comedy and horror, “high” art and “low” art, pathos and irony—its central contradiction really boils down to this: while it has the structure of a whodunit, it rejects the entire notion of a solution.
Here’s what I mean. The whodunit, as a literary and cinematic narrative form, has always posited a reductive view of human nature. Human motivation exists in a whodunit as little more than a piece of the puzzle. This isn’t to say that whodunits can’t be well-written or fun, but it is to say that their overriding objective is to answer one central question: who is the murderer? Once that question has been answered, the whodunit is over. The who is more important than the why. The killer, once revealed, ceases to be a source of interest or contemplation. The end of a whodunit reassures us that the bad person has been weeded out from among the good people and that order has been restored. (Noir, in contrast to the whodunit, has always been more interested in the why than in the who. This is the reason that so many noirs are told from the point of view of the killer rather than the cop.)