I'm of the school of thought that in fiction, everything should happen for a reason.
See 'In Bruges' for a masterclass in writing whilst adhering to that rule. Nothing happens in that film that doesn't come into play later on. It all ties together beautifully and seemlessly.
Other films are less blatant with how everything ties together. A scene may exist purely to show or develop an aspect of a character's personality. It might exist for exposition. It might exist for a character to acquire an item that'll allow them to do something. But a scene should always tie into things on a larger scale and like I said, you could essentially lift the Cornwood segment from the film and it'd still make absolute sense. It's not even like the trip to Cornwood teaches anybody a lesson about life or something like that.
True. But Futurama
is also largely driven by humor, meaning that if it made you laugh, it had a purpose. And it is not as if the plot came to a standstill during the Cornwood segment -- the characters still worked toward the same goal (albeit after a period of reorientation) and dealt with their obstacles just as they would have in the real reality. The only difference is that they fell through to the fantasy world. Which, like most things on the show, was to facilitate laughs.