"And now, I would ask of you, my beloved brethren, wherein the Lamb of God did fulfill all righteousness in being baptized by water? Know ye not that he was holy? But notwithstanding he being holy, he showeth unto the children of men that, according to the flesh he humbleth himself before the Father, and witnesseth unto the Father that he would be obedient unto him in keeping his commandments."
Although Christ was the one mortal upon whom death could make no claim (He being holy), He nonetheless obeyed the same conditions as everyone else. Notwithstanding His holiness, His right to face judgment and not be condemned, He set the example. No one else could face the judgment and pass. Therefore, everyone other than Him would require baptism for repentance and remission of their sins. He did not. He determined to obey anyway so everyone could see the strait path by which they can obtain hope.
He was flesh. He was mortal. He could (and did) die. Though death could not claim Him, He was to die. Baptism is the great symbol of death and resurrection, and He is the resurrection. He lived the symbol as well as the reality, so all others could have part in that victory. The symbol to point the way. The reality to open the way. We are in turn "shown the way" by what He did.
He also "witnesses" before "the Father that he would be obedient unto Him."
Think about the command of understanding Nephi is exhibiting here. He is telling us that Christ's mortal ministry would include these very specific events for these very specific reasons. This was what he was permitted to tell us. What other information was within his knowledge which he was forbidden from sharing? Does this level of understanding by Nephi tell you something about what can be learned from the Lord if you are diligent in following His path? Why, if you can see what may be available, would you not be willing to do whatever is asked of you in order to receive something similar in your own life?
Well, the foundation of the "doctrine of Christ" begins by seeing Christ's example, learning of the necessity of baptism and obedience to the will of God. That is where everyone must begin. If you start right, you are likely to continue in the right way. But if you do not begin aright, then you are not likely to have any ability to return and find the right way. You cannot enter in by some other way. If you enter in the right way, you will begin to recognize the True Shepherd's voice. (John 10: 1-5.) This is the beginning. It is as important to the doctrine of Christ as all that will follow.