According to I Peter 3:19-21 the Holy Spirit (Jesus) said through Peter "By whom also he went and preached unto the spirits in prison, (v20) Who at one time were disobedient, when once the longsuffering of God waited in the days of Noah, while the ark was preparing, in which few, that is, eight souls, were saved by water; (v21) THE LIKE FIGURE unto which even baptism DOTH ALSO NOW SAVE US (not the putting away of the filth of the flesh, but the answer of a good conscience toward God), by the resurrection of Jesus Christ," Well, if Jesus said it, who are we to argue?
As Kiss and Tales said, Jesus did so as an example for us to follow. John didn't feel worthy to baptize Jesus but Jesus said in Matthew 3:15 "...Permit it to be so now; for thus it becometh us TO FULFILL ALL RIGHTEOUSNESS. Then he consented to him."