Here's my theory on Pippin as comic relief in the movie but not in the book:
Tolkien was writing an epic. An epic is not meant to be funny. An epic is meant to be high and stirring and tragic, because when you finish the book you remember that it's just a story, but then you realize that in a way it's true too.
Back to my point. The people in an epic, on matter how high, are still real people. The best way for people to connect with other people is to show those other people as real people. What I mean is Aragorn undoubtedly laughed, and Gandalf probably liked good food. Maybe Boromir secrely liked French opera

. So, they had to show the human side of people to make them seem human, and for people to realize that "Wow, I guess they're just people after all." And Pippin was one of the easiest to connect with.
Does anyone at all get what I'm trying to say? I'm not even sure if I do.