Why did Jesus have to be baptized by John (Matthew 3:13–17)?

Through His baptism, Christ identified with sinners, for He would ultimately bear our sins; His perfect righteousness would be imputed to us (2 Corinthians 5:21). The act of baptism was a necessary part of the righteousness He secured for sinners. This first public event of Jesus’ ministry is rich in meaning: (1) it pictures His death and resurrection; (2) it prefigures the significance of Christian baptism; (3) it marks Jesus’ first public identification with those whose sins He would bear; and (4) it affirms His messiahship publicly by testimony directly from heaven (see p. 52).