Jesus gave the answer in John 3:14 "And as Moses lifted up the serpent in the wilderness, even so must the Son of man be lifted up."
Jesus was saying that the serpent on the pole is a picture of Him on the cross.
the least understood and taught part of the atonement