“Whoever says that David sinned is simply mistaken” (Shabbos 56A).
After reading the story of David and Batsheva it is difficult to understand this Gemarah. It would seem that King David committed both adultery and murder in this encounter both grievous sins. Why does the Talmud record these words of Rav Shmuel bar Nachmani in the name of Rav Yonasan here (not only in reference to King David’s actions but also the same phrase is used to justify the questionable actions of the sons of Samuel, King Solomon and King Yoshiyahu.) Are we trying to clean up history and portray our leaders in a better light?
Perhaps there is another way to understand this. There is a purpose to any incident recorded in Nach. The Navi is trying to teach us something by recording this incident and the incidents that follow it. Nathan the prophet harshly rebukes David and tells the King that Hashem is upset with David’s conduct. David’s life will be spared but he will be punished severely. The child born out of this relationship dies immediately, David’s wives will by violated by others, David’s daughter Tamar is raped by her half brother Amnon. Amnon is killed by David’s son Absalom and Absalom rebels against David.
If David really sinned and violated Hashem’s commandments then this whole sequence of events and punishments would be understandable and we would not question it. King David commits a serious set of sins and is therefore severely punished. If however David did not technically sin and in his Ruach Hakodesh knew that Batsheva would be his wife and the mother of Solomon why is he so severely punished? According to the customs of warfare at the time, Batsheva was technically a divorced woman who David had relations with and Uriah, her husband, was technically a mored be malchus, a rebel against the King and deserving of the death penalty. Then David is off the hook: acquitted and innocent because of a technicality or loophole in the law. If David is in fact innocent why does the Nach narrative continue with these incidents of severe punishment?
The Gemarah cites Rav Shmuel bar Nachmeni’s view. It is true. David did not really sin. But as the events are recorded in Nach he is still held accountable for his actions. Even though technically he may not have sinned or violated halachah, his intentions were not pure. After hearing Nathan the Prophet’s parable, David understands this. What he had done was terribly wrong in the eyes of God. He proclaims to Nathan the Prophet chatasi la Hashem “I have sinned to Hashem”.
Tehilim 51, King David’s prayer becomes the model of repentance and confession. “I recognize my transgression, and my sin is before me always. That which is evil in Your eyes did I do.” (51.6) “I will teach transgressors Your ways, and sinners shall repent onto you.” (51.15)
Perhaps this story is recorded to teach us that we are not only held accountable for straightforward sins, but also for situations where we may be technically not guilty of breaking a law, but still guilty of having done something wrong in the eyes of God.