28 And moreover, I say unto you, that salvation doth not come by the law alone; and were it not for the atonement, which God himself shall make for the sins and iniquities of his people, that they must unavoidably perish, notwithstanding the law of Moses.
In the prior chapter, the priests told Abinadi that they taught the law of Moses. He then asked them a significant doctrinal question: “Doth salvation come by the law of Moses? What say ye?” They answered “that salvation did come by the law of Moses.” As their teacher, Abinadi could have corrected them immediately, but he didn’t. His first reaction was to find common ground and to reaffirm the truth in what they had said: “I know that if ye keep the commandments of God ye shall be saved” (Mosiah 12:31-33). Only after reviewing the Ten Commandments and urging them to obey them did he provide the more complete answer: no amount of obedience to law will save you without the Atonement of Jesus Christ.
We are all subject to the effects of the fall of Adam, and we have all sinned and fallen short of the glory of God (Romans 3:23). We need God’s grace to help us overcome our natural tendencies, our bad habits, and our past sins, and to become pure and holy so that we will be worthy to again enter God’s presence. Does salvation come from obedience to God’s commandments? No, it does not. We cannot save ourselves. Do we need to obey in order to be saved? Yes, we do. We access God’s grace by obedience to the laws and ordinances of the gospel (Articles of Faith 1:3). Furthermore, our salvation consists in becoming the kind of people who can live in the presence of God, and that means that we must “learn obedience” to God’s law (Hebrews 5:8, D&C 105:6).