John 20:31 says that the book was written so that “you may believe that Jesus is the Christ, the Son of God.” It’s best to read it as an argument disguised as a story. The Gospel of John wants to make the case that Jesus was who he said he was, and all the miracles and conversations here are presented as evidence for that case. Whether Jesus is healing the sick, condemning injustice or praying for the Church, John is hoping you’ll see that this was no normal man.
At the time this book was written, there were still a lot of different ideas floating around about who Jesus was. Many scholars think John wrote this as a way of letting the world know, once and for all, who Jesus himself said he was.