After noting the question of why one without sin should need a baptism that enacted the removal of sin, Nephi answers that it was to “fulfil all righteousness.” What he means is that while the atoning Messiah accomplished the atonement, He accomplished more than that. There is a doctrine of Christ that shows the way to enact the atonement in our lives, and then to use the atonement to walk the path that leads to eternal life.
The path is there for us to follow, and Christ walked that path—even if there were parts of the process that did not apply to Him. In Nephi’s words, He showed “unto the children of men the straitness of the path, and the narrowness of the gate, by which they should enter, he having set the example before them.” Christ did not simply tell us the way. He showed us the way.