Why does "Henry IV, Part I, shift back and forth from national affairs to the comic world of the taverns?
There are different world in this story "Henry IV, Part I", the world of political affairs and the world of Eastcheap's taverns which Falstaff and his rowdy crew belong. Shakespere exploits these contrasts and differences by shifting back and forth from different worlds and events.
This method has many functions. It is to:
1) have a vairable tempo added to the story.
2) put it comfic relief so as to cool down the seriousness of the topic involved.
National Political outrage and disaster is a very serious matter and it is moving at a fast speed with imminent dread but by adding in some "comic moments", the story would unfold into an lesiurely pace and speed and it is enough for the audience to follow.
Nobody would want to watch a play with only doom and gloom, a few dose of laughter and joy is just what they need for an eventful day. As you all know, laughter is the best medicine.
I think the reason might be to (1) lighten the mood of the subject dealt with, and (2) to better show the character of Prince Hal. The play questions the legitimacy of a ruler when his people are unhappy with him, which can be a sensitive subject. Adding humor allows it to be examined while giving a lighter mood to the whole piece. As for the second, Prince Hal is going to eventually become Kind Henry V, and showing his transformation in this play adds to his character.