The story of David and Bathsheba troubles some people. David appears to get way with murder [literally] and adultery. It is unclear how willing a party Bathsheba was to adultery. David, the king, initiated the relationship. Bathsheba had little choice but to obey, whether this was willing or unwilling obedience we are not told. In any case, the Scripture is crystal clear regarding David's actions.
And for your lifeblood I will surely demand an accounting. I will demand an accounting from every animal. And from each human being, too, I will demand an accounting for the life of another human being. “Whoever sheds human blood, by humans shall their blood be shed;for in the image of God has God made mankind." Gen. 9:5-6, NIV
“If a man commits adultery with another man’s wife—with the wife of his neighbor—both the adulterer and the adulteress are to be put to death." Lev. 20:10, NIV
Here we have capital punishment given for murder and adultery separately and David committed both of them. He was guilty of two capital offenses and yet escaped the death penalty! Why? Was God favouring David? Was He turning a blind eye to His own standard of righteous? Obvious not. God cannot be unjust. So what was happening here?
God's Law works to protect the innocent. The principle of "innocent until proven guilty" is a Biblical principle. An unfortunate consequence of protecting the innocent is that sometimes the guilty may go free. Although the guilty may occasionally escape justice on a human level, they will not escape it when they stand before God's Judgment Hall - as we all must do.
One of the provisions God made to protect the innocent was:
"On the testimony of two or three witnesses a person is to be put to death, but no one is to be put to death on the testimony of only one witness." Deut. 17:6, NIV
A minimum of two independent witnesses was need for a conviction in a human court.
Let's take a look at the strange case of David and Bathsheba from a legal perspective.
First, as the above passage from Genesis makes clear, God delegated the responsibility for dealing with murderers to human authorities. If a human being is murdered, the murderer's life must be taken by human beings after due process of law. This shows that we must stand with God and against all evil. While God will judge all things at the Final Judgment, He has left it up to human courts to follow His commands in this regard on earth. One of the signs of a nation in rebellion to God is its refusal to execute murderers.
Second, there needed to be, at least, two witnesses. Without witnesses a crime cannot be legally prosecuted.
While there would have been court rumors about the relationship between David and Bathsheba - possibly started by the messengers who brought Bathsheba to David for her audience with the king - that is not evidence. Probably the only person who could testify to the adultery would be Bathsheba, and in doing so she would have incriminated herself in a capital crime. So it is not likely she would act as a witness and, even if she did, that would only be one witness.
In the case of the murder of Uriah, David was especially tricky. He gave the command so that it would look like a normal casualty of war. His written letter would have been evidence, but the only one who saw it was Joab. As a military strategist he would have been smart enough to destroy the letter - especially since he followed the instructions and became an accessory to murder. This also means he would have been very unlikely to testify against David.
In a way, David committed the perfect murder. No physical evidence and any witnesses were also accessories. There could be no court case, and no conviction. David was set to escape God's justice as manifested through God-delegated human court systems.
"But the thing David had done displeased the Lord." Sam. 11:27b, NIV
David thought that would be the end of the matter. In many cases, it would have been until the Final Judgment. God does not undermine His delegated authorities, although they will be judged if they fail to enforce His law. At the Final Judgment perfect justice will be given to all. No one really escapes, they only get a temporary reprieve.
Because David was a representative of God and had brought dishonour and contempt on the Name of God by his actions, God wanted to show that He did not condone David's actions. David had not been representing God in this matter, but his own selfish and lustful desires. So David came under the judgment of God.
did you despise the word of the LORD by doing what is evil in his eyes?
You struck down Uriah the Hittite with the sword and took his wife to
be your own. You killed him with the sword of the Ammonites. Now,
therefore, the sword will never depart from your house, because you
despised me and took the wife of Uriah the Hittite to be your own.’
“This is what the LORD says: ‘Out of your own household I am going to bring
calamity on you. Before your very eyes I will take your wives and give
them to one who is close to you, and he will sleep with your wives in
broad daylight. You did it in secret, but I will do this thing in broad
daylight before all Israel.’”
Then David said to Nathan, “I have sinned against the LORD.”
Nathan replied, “The LORD has taken away your sin. You are not going to die. But because by doing this you have shown utter contempt for the LORD, the son born to you will die.” 2 Sam. 12:9-14, NIV
From this point on, David would have trouble in his own house. Even through he repented and was forgiven, he would spend the rest of his life living with the consequences of a few moments of stolen pleasure. Within his own family there would be strife, rebellion, rape and murder. Also, the son that was born to David and Bathsheba would die - the innocent for the guilty. Sin always bears bitter fruit.
Did God show favoritism to David and Bathsheba by not Personally executing them? No, God's delegated courts were powerless because of the lack of physical evidence. Had there been sufficient evidence the case would have been different. Nevertheless, God did not let him escape. In many ways the punishment David faced was worse than a simple execution.
The second son of David and Bathsheba, Solomon, became the next king of Israel. While we live with the consequences of our actions, God does forgive and life goes on.