The story of David and Bathsheba is one of temptation, sin and anguish.
Because of a horrible act of adultery, Bathsheba became pregnant and had a
child. As a result, Godís sentence was that the child should not live. Though
David fasted and begged God to spare the childís life, God remained resolute and
allowed the child to die (II Samuel 12:14).

But what if God had spared the childís life? What if He had shown mercy
to David, Bathsheba and the child and had foregone the punishment?

No doubt, Godís decree was sore, but there was a lesson that He had to
teach David and future generations. David had to learn the great lesson that sin
is detestable in Godís eyes, and that He will punish sinners, no matter what
their rank may be. Moreover, God wanted David to learn that, though much had
been given to him, much was expected from him and that, as Godís anointed, he
had the duty to set a righteous example for the whole nation. If God had allowed
David to escape his punishment, that lesson would have never been learned, and
David might have continued to rebel against Godís will.

Furthermore, Davidís servants who were aware of his sin, and the
whole nation that would have finally found out, might have concluded that God
has double standards, and that rulers receive special treatment, even when they
commit heinous sins.

In fact, when Nathan the prophet confronted David, he
stressed the fact that, as a result of Davidís sin, Godís enemies had received
an occasion to blaspheme (V. 14).

God was willing to forgive David, but He decreed that
he had to be consequenced to silence the opposition. God had to make clear to
all that sin is reprehensible to Him, no matter who the perpetrator may be, and
that He judges all humans equally.

Had David been allowed to escape the just consequences to his evil deed,
all believers throughout the ages may have been emboldened to conclude that God
had a slack approach toward sinners and, consequently, might have adopted a
relaxed approach toward similar sins. Worse of all, many might have concluded
that God had double standards, and was, therefore, unfair and unjust.

Clearly, the punishment for Davidís sin was very strong. But if God had
simply allowed David to get away with it, the long-term ramifications would have
been disastrous for many. God knew this and intervened, lest there would be any
doubt in anyoneís mind that sin is detestable in His eyes, and that
transgressions to His Holy Laws carries strong penalties, even if they are
perpetrated by great Biblical characters such as David.