Critical New Testament scholarship generally regards Jesus's baptism by John as one of the more securely attested episodes in the Gospels, resting on a principle scholars call the criterion of embarrassment: an episode that created theological difficulty for the early church, rather than serving its interests, is less likely to have been invented, since there was no obvious motive to create it and considerable reason to soften or explain it away, which is exactly what later Gospel writers appear to be doing with Matthew's added exchange and John's indirect narration.
Read plainly, Jesus being baptized by John for repentance implies a form of subordination, John's ministry preceding and in some sense authorizing Jesus's own, that sits awkwardly with the higher Christology later Christian communities developed regarding Jesus's unique divine status. The progressive softening visible across the four Gospels, from Mark's unadorned account through Matthew's justifying dialogue to John's avoidance of narrating the baptism directly, is read by many scholars as evidence of a real historical event that later tradition worked to reframe rather than as a scene invented from nothing.
The episode's theological significance for later Christianity, understood as a revelation of the Trinity and as the model for Christian baptism itself, developed considerably beyond whatever the historical event, if reconstructed on strictly critical grounds, can support on its own, a gap between historical reconstruction and theological meaning that recurs across many Gospel episodes.