Neil, you did a great job of lifting up the aspects up the story that paint David in a less than positive light.
One scholar named Steve McKenzie suggests that the whole account is trying to clean up David story. Mckenzie reads underneath the story to see what the text is trying to protect him from.
You didn't talk about the second part of the question: why someone writing in exile would characterize David in this way