I found the following statement on 1 Samuel 11:1–27 concerning the sordid tale of David and Bathsheba to be insightful.
“In the English translation, as in the Hebrew, the very last word of this episode is ‘the Lord,’ This is the only reference to God in this chapter and it comes right at the end. The reader knows what this means: the Lord not only is the last word, he has the last word.
“‘The thing that David had done displeased the Lord.’ The only question is, ‘What thing?’ Is it David’s idleness on the couch at the time when kings go to war? Is it his lust on the roof top, or his pursuit of the woman he saw? Is it the essential act of adultery of David’s attempt to deceive Uriah into believing himself to be the father of the child? Is it his cynical ploy to get Uriah drunk, or still more cynical decision to send his death warrant by Uriah’s own hand? Is it the death of Uriah or the other Israelites who died with him? Is it the fact that he enlisted Joab in his malice and the messenger too? Or is it the sum total of these many steps?
“Ultimately the transgression at the heart of this story is one of violence rather than of sex. While it probably is the whole sequence of events as they unfolded which displeased the Lord, the development which most stands out is David’s capacity for violence against an ally. Although he has previously shown himself capable both of personally perpetrating violence (for example against Goliath in 1 Samuel 17.51) and of ordering violence to be done (for example 1.15 and 4.12), he has shied away from shedding innocent blood. Previously David has been the model of restraint. His restraint was perhaps his defining characteristic in the story of his rise. Where he sensed a moral constraint, he refused to act violently, and would not countenance the violence of others. But that was then – in the days when his power was limited. Now he is king and those days are gone.”
Pete Wilcox, Talking the Talk: The Fall of King David for Today: A Dramatic Exposition of 2 Samuel 5:11 to 1 Kings 2:11 (Cambridge: Lutterworth, 2011), 60–1.