I'm sure everyone wanted to know the identity of the traitor. Peter gestured to John that he wanted to know. This may have been the push that John needed to ask Jesus who it was. So John leaned back upon Jesus' breast and asked Him. This appears to be a private conversation between them.