Don't be mistaken, since this genre has dwindled, there are a lot of detective thrillers you might confuse for the same thing. Movies and TV shows like Se7en, The Girl With The Dragon Tattoo, True Detective, and The Killing are all wonderful, but often conclude with the killer being some background Waldo from a single scene we long forgot about. Other times, we get movies like Shutter Island, which start promising but end up betraying their genre for some crazy Fight Club ending.
See, the classic whodunnit, while having some twists and turns, doesn't need an outlandish narrative u-turn to be enjoyable. The appeal lies in the characters and tension of the environment. But as filmmakers kept making these movies, there was a weird pressure to force various third-act gimmicks to keep the premise fresh. A good example has to be Scream, which I would argue is a horror version of a whodunnit (complete with a mustache from Dewey). As they kept making sequels, the writers kept trying to make the final reveals more and more elaborate and twisty, making the killer impossible to determine ahead of time due to a lack of necessary information being given to the audience.
Of course! It was the lady we saw once in a previous scene, who it turns out is the mother of the killer from the first movie! It's so obvious now!