The only reason why Jesus was baptized by John is that Jesus was initially a disciple of John, who later on started his own sect of radical, messianic judaism. That's the simple truth that the early christian writers attempted to obfuscate when they wrote the gospels. Because that would undermine the belief that Jesus had been God's anointed envoy.
The baptism of Jesus (not in the sense it was performed directly by Him) is totally different from the baptism of John.
Of course, that's the explanation that the later followers of chistianity had to come up with to say that the baptism of Jesus was superior to that of John. This happened in a time when the disciples of John who didn't buy into Jesus' sect were still raising controversy with the Jesus followers, as it is vaguely documented in Acts. The fact that the author of Acts even mentioned it (only to then tell the story that those had finally converted to christianity) denotes that this controversy was still well alive still many decades after Jesus' death and was a theological problem for the early Christian congregation. That is why (not a coincidence!) only Luke and Matthew tell the story that John Baptist wanted to be sure that Jesus was the messiah (Matthew 11:3; Luke 7:18, 19), to give the impression that even John Baptist accepted Jesus as the messiah. This story is implausible and probably never took place, and that's why Mark (the earliest gospel) and John don't mention it.
Still, if baptism is an essential sacrament for salvation, why weren't the apostles baptized by Jesus?