When watching a movie like Anchorman, we don’t really think about how many of the lines are being made up on the spot, but at the end of the film, during the bloopers/outtakes, we get to see a few of the ridiculous lines that didn’t make the final cut. The actors were given basic direction and had to improvise some of their own lines, many of which were just as funny as the version that was used in the film.
A similar technique was used to create the Rick and Morty episodes Interdimensional Cable and Interdimensional Cable 2. The sketches were halfway worked out on storyboards, but the voice actors had to come up with all of the dialogue on their own. By doing it this way, the sketches are lighthearted and silly, which gives some balance to the otherwise serious episodes. In the first of these two episodes, Rick even remarks that the skits have “an almost improvisational tone,” which is a joke for the audience about the production of the episode.
Even outside of the media of improvisational comedy shows, there is still a need to be able to think quickly and come up with punchlines on the spot. It feels more natural and conversational to the audience because in real life, funny people don’t have a rehearsed version of their jokes, they just generate them as necessary.