1. Because while the obvious action is happening elsewhere, the really important stuff is happening to the narrator. In The Great Gatsby the action happens between Gatsby, Daisy, her husband Tom, and Tom's mistress, Myrtle. It's observed by the narrator Nick Carraway who apparently doesn't have much to do with events, he's just tagging along. But he's the one who is changed by what he witnesses and by the end is a different person. The Great Gatsby is really the story of Nick's internal journey.
2. When your main clever is just too clever for their own good. We might admire super clever people, but our human reaction in most cases is to knock them down. Ditto anyone who is incredibly talented/rich/beautiful. It's very hard to work up much sympathy for them. If we want to write about a character who is extra clever/beautiful/rich/whatever, it's easier if we use an external narrator who can be normal, and so readers can identify with them. Sherlock Holmes is fascinating to read about from Dr Watson's point of view, but I think we'd get very fed up with him if he was the viewpoint character. Too full of himself, apart from anything else.
3. When your main character knows too much. Sherlock Holmes again comes to mind - he works out the answer much earlier than anyone else, so if we were in his mind, the stories would be that much shorter. Gandalf, in The Lord of the Rings and The Hobbit, has lots of adventures but remains a shadowy figure in the background while the hobbits take centre stage. Gandalf knows more or less everything already, so the story wouldn't be able to unfold if he were centre stage. And Tolkien wouldn't be able to spring the 'we knew it was an impossible task from the start, but if you'd known that, you wouldn't have been able to do it' line. An interesting example is The Murder of Roger Ackroyd where the narrator is actually the murderer, but of course, isn't revealed until the end. Christie's readers were appalled by her playing this trick on them as it didn't seem fair.
4. When your narrator is unreliable. The unreliable narrator may be knowing, like Barbara in Notes from a Scandal, or unknowing, like the butler in The Remains of the Day, but either way, the person who is learning and changing as they see events unfold is the reader, rather than any of the characters. As a reader I like an unreliable narrator, but they are tricky to get the balance right between what they reveal and what they don't.
Generally, the rule remains - point of view should be with the person who the important, exciting action is happening to. But in this case there are always exceptions to rules.