Answer:
To reduce the tension after Duncan's murder.
Step-by-step explanation:
In "Macbeth," Shakespeare makes use of the Porter scene to add relief after a highly dramatic event, such as King Duncan's death. Thus, the comic relief of the Porter scene contrasts with the protagonist's feelings of guilt after killing Duncan. Besides, it compares the Porter with the gatekeeper of hell, where Macbeth will live after committing murder.