"Why have you despised the word of Jehovah by doing what is evil in His sight? You have stricken down Uriah the Hittite with the sword and have taken his wife as your wife and have slain him with the sword of the children of Ammon" (v. 9). Here God, speaking through Nathan, condemned David for murdering Uriah and for robbing him of his wife.
Nathan told David that because he had despised Jehovah the sword would not depart from his house forever (v. 10). God would raise up trouble against him from within his house. Further, God said that He would take David's wives before his eyes and give them to his companion, who would lie with them in the sight of the sun (v. 11). David had done this secretly, but God would do it before all Israel and even before the sun (v. 12).
Here we see that God is not only loving; He is also fearful. Under God's punishment, there was fornication and killing in David's family, and David's son, Absalom, even rebelled against him.
David confessed his sin against Jehovah, and Nathan said to him, "Jehovah has also put away your sin; you will not die" (v. 13). That was God's mercy to David, for David surely deserved to die. Nevertheless, because David had given the enemies of Jehovah much occasion to blaspheme Him, Nathan told him that the son who was born to him would surely die (v. 14).
When God forgives, He forgets (Jer. 31:34). To forgive is to forget. But it seems that God did not forget this sin of David's. As we have pointed out, in his record of Christ's genealogy, Matthew purposely wrote, "David begot Solomon of her who had been the wife of Uriah." This indicates the seriousness of David's sin.
We need to learn of David on the negative side as well as on the positive side. The lust of the flesh is a devastating element that can destroy us. If such a godly man as David could be seduced, can we escape? Human beings are human beings, flesh is flesh, and lusts are lusts. We should always keep a distance between ourselves and those of the opposite sex. A young man or young woman should not talk privately with someone of the opposite sex in a closed room. No godly person should be loose in contacting the other sex. Regardless of our attainment in our spiritual pursuit, it is possible for any of us to commit such a sin.