John was doubting whether Jesus was Messiah. He needed assurance because his whole life had been about preparing the way for the Messiah.