C- Because the audience needs a chance to release the tension from the drama of the previous scene.
Shakespeare uses 'clown' characters to release tension after particularly dramatic scenes. The porter acts as a comic character to give the audience a break of serious, dramatic emotions. His humor would help the audience regroup and prepare for the drama to come.