In good storytelling, when one story is intermingled with another, the sum of the two stories together creates a far more powerful impact than either of the two stories told alone.
John does this for us in this passage—Jesus’s trial in the inner chambers of the high priest with that of the denial of Peter in the courtyard. Together, the two stories impact us with the wonderful faithfulness of our Savior against the backdrop of the sad unfaithfulness of Peter, His most outspoken follower.