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.
We are given commandments to guide our behavior, to show us right from wrong, and to help us be better people. But no matter how we try, we cannot be perfect. We can - and should! - strive to obey every commandment, but inevitably we will make mistakes. Thankfully, "salvation doth not come by the law alone." It is not ONLY by obeying God's commandments that we will be saved. Because of the atonement, we are redeemed from sin and error. It is only because of the atonement that we will not "unavoidably perish."