This is a very familiar scene and story, but we have to look at the points that John is particularly trying to make.
All of the imagery is dark with evil and disrepute: he carried his own cross, it was the Place of the Skull, he was surrounded by criminals. The crucifixion is written to capture the intense isolation and suffering of Jesus. Relationally, emotionally, physically, and spiritually, the portrait is painted that he is cut off, opposed, denied, mocked, reviled, falsely accused, physically destroyed, reputationally discredited, abandoned, and humiliated. It’s “death” in every literal and metaphorical sense.
I think they crucify him not so much as a criminal, but as a valueless toss-away. Pilate didn’t find any guilt, but his position wasn’t worth the trade-off: Fine, kill the guy. Who cares? The people were willing to trade him for Barabbas. Kill him. He’s not worth the trouble he’s causing. The Jews didn’t want an interruption to their power with the people or with their interpretation of Scripture. It’s easy to trade a life to preserve the order. Kill him. Our ways are more valuable than one life. Jesus was a piece of human litter, fit to be crumpled up and discarded. That’s what his crucifixion was: the repudiation of refuse.
But John still wants us to know who Jesus was (which is the point of his whole book): Jesus of Nazareth, the king of the Jews. The one who fulfills the Scripture (v. 24, 28, 36, 37). Through the passage we see the continuing theme of light vs. darkness, those who believe (v. 25, 35) vs. those who don’t.
Jesus says “It is finished.” The work he came to do—to die for the sins of people and redeem them—was accomplished. While it looks as if Jesus has failed, in reality he has won the victory.