I've read in Ellicott's commentary that the "other" disciple of John 18:15 might be James, for it stands in contrast to John's supposed self-designation as "the beloved disciple". But that got me wondering: why did John not directly name himself or his brother within the entire gospel? Is there any church traditions or research out the that disseminates why John may have not wanted to name himself or James within his own gospel?
If John wrote the 4th Gospel, why did he not name himself or his brother?
St. John the Evangelist was a very humble, yet confident individual before God.
Humility kept him from naming himself as the author of the fourth Gospel.
Saint John and his brother, Saint James the Greater, the sons of Zebedee, were given the nickname "Sons of Thunder" by Christ Himself.
St. John the Apostle was known as the “beloved disciple” of Jesus.
It is said that John "reclined at the bosom of the Lord" during the Last Supper. It was John who asked Christ who His betrayer would be.
Please remember also that the only apostle who did not flee the scene of the crucifixion was St. John himself.
It was John the Beloved who kept vigil at the cross with the Blessed Virgin Mary. It was Saint John to whom Jesus confided the care of His mother from the cross: "John, behold your Mother...Woman, behold your son."
John was with Peter when Mary Magdalen came upon them after seeing the empty tomb. Both John and Peter ran to the tomb, but John ran faster, for he was younger. However, upon arriving at the tomb, John waited outside for Peter and then followed him into the empty room where Christ had been laid. It is clear that Saint John acted in humility and respect. He allowed Peter—whom Christ had chosen to be leader of the Apostles—to enter first. - 3 Things We Can Learn From Saint John The Beloved
But it is the last chapter of the Gospel of St. John, that shows his true humility in not naming himself as author of the Gospel.
20 Peter turned and saw that the disciple whom Jesus loved was following them. (This was the one who had leaned back against Jesus at the supper and had said, “Lord, who is going to betray you?”) 21 When Peter saw him, he asked, “Lord, what about him?”
22 Jesus answered, “If I want him to remain alive until I return, what is that to you? You must follow me.” 23 Because of this, the rumor spread among the believers that this disciple would not die. But Jesus did not say that he would not die; he only said, “If I want him to remain alive until I return, what is that to you?”
24 This is the disciple who testifies to these things and who wrote them down. We know that his testimony is true.
25 Jesus did many other things as well. If every one of them were written down, I suppose that even the whole world would not have room for the books that would be written. - John 21:20-25
Humility was possibly not the only factor. St. John looked after the Mother of Jesus for many years and it is not inconceivable that in order to protect Jesus’ Mother, the “Beloved Disciple” wished to remain to some degree anonymous, in case persecutions broke out.
The answer likely lies in differences between literary types. Letters typically include greetings wherein the audience and author are identified. Books or histories are less likely to include such things as there is no specific target audience and, since the author is relating factual rather than personal content, the authors name is irrelevant.
Matthew refers to his Gospel as a book (biblos):
The book of the genealogy of Jesus Christ, the son of David, the son of Abraham.- Matthew 1:1
In Acts, Luke refers to his gospel as his first book:
In the first book, O Theophilus, I have dealt with all that Jesus began to do and teach, - Acts 1:1
The other two gospels do not refer to themselves as books but there is a distinct lack of signate authorship common to the books of Matthew and Luke.
In Mark's gospel (which strong opinion considers as Peter's account written by Mark) we see Peter unnamed although he is identified in John 18:10:
But one of those who stood by drew his sword and struck the servant of the high priest and cut off his ear. - Mark 14:47
And, as OP points out, John also leaves himself unnamed, although perhaps less so than the others as he gives himself the title of "the disciple whom Jesus loved".
Matthew is perhaps anomalous in that He does use his own name when narrating his own call but the anomoly may be negated in that the calling of a disciple is not unique to Matthew alone:
As Jesus passed on from there, he saw a man called Matthew sitting at the tax booth, and he said to him, “Follow me.” And he rose and followed him. - Matthew 9:9
The 4 Gospel accounts and Acts seem to fall into the same category of literature as determined by lack of signate authorship. Whether or not book is the correct label, at least two of the five self-designate as such.