For whatsoever things were written aforetime were written for our learning, that we through patience and comfort of the scriptures might have hope. Romans 15:4
Men whom God favored, and to whom He entrusted great responsibilities, were sometimes overcome by temptation and committed sin, even as we at the present day strive, waver, and frequently fall into error. Their lives, with all their faults and follies, are open before us, both for our encouragement and warning. If they had been represented as without fault, we, with our sinful nature, might despair at our own mistakes and failures. But seeing where others struggled through discouragements like our own, where they fell under temptations as we have done, and yet took heart again and conquered through the grace of God, we are encouraged in our striving after righteousness. As they, though sometimes beaten back, recovered their ground, and were blessed of God, so we too may be overcomers in the strength of Jesus. On the other hand, the record of their lives may serve as a warning to us. It shows that God will by no means clear the guilty. He sees sin in His most favored ones, and He deals with it in them even more strictly than in those who have less light and responsibility. (Patriarchs and Prophets, 238)
Reflection: Here we have another principle. Not only are we to learn from Christ's perfect example, but we can and are admonished to learn from those who made bad choices and reaped hard results. That is a path that we do not have to travel. Those stories were written so we could avoid repeating the same mistakes.