The close of the career of John is introduced by Luke at this point of his narrative to prepare the way for his account of the ministry of Christ. It was actually some time after Jesus had begun his work that Herod the tetrarch arrested John and cast him into prison because he had rebuked the profligate king for his impurity and his sin. John had been a faithful messenger of God, but the world does not reverence its prophets; they are usually imprisoned, beheaded, burned, or crucified.

21 Now it came to pass, when all the people were baptized, that, Jesus also having been baptized, and praying, the heaven was opened, 22 and the Holy Spirit descended in a bodily form, as a dove, upon him, and a voice came out of heaven, Thou art my beloved Son; in thee I am well pleased.

The Gospel of Luke, An Exposition — Part 26

Why did the ideal Man, the Son of God, submit to the baptism of John, a baptism of repentance? Surely not to confess any sin of his own; but first of all to set his seal of approval upon the work of John and to attest the message which declared that repentance and confession of sin are absolutely necessary for all who are to share the salvation of Christ.

The Gospel of Luke, An Exposition — Part 26

Then again by his baptism Jesus identified himself with his people, not as being sinful, but as doing what they were commanded to do and as sympathizing with them in their hatred of sin, in their distress for its burden, and in their hope and expectation of relief. Only those who sympathize can serve and save.

The Gospel of Luke, An Exposition — Part 26

Then again baptism indicated that the penitent had broken with the past to begin a life of new holiness and obedience. So in his baptism Jesus was ending his quiet years of preparation in Nazareth and was about to enter upon the ministry of service and sacrifice which was to be performed in obedience to the will of his Father. It is for this reason that Luke, with the art of a skilled historian, first completed the story of John, the great forerunner, before mentioning that which in reality was the supreme incident in the career of John—his baptism of Jesus. That incident introduced Jesus to his public ministry and that ministry was to form the very substance of the gospel.

That the incident is merely introductory to his narrative, is evident also from the way in which Luke records the baptism. He does not describe the event. He merely mentions it to designate the time when Jesus saw the descending Spirit and heard the voice from heaven. The former was a symbolic indication of the power by which the work of Jesus was to be performed; the latter was a declaration that he was the Christ, upon whom rested the approval of God.