When I was still a young believer of 19 years old, I attended a small Baptist church. There was always a shortage of workers in the church, so I was appointed as Sunday school teacher to a group of fourth grade boys. I was given little training; just handed a "quarterly" and assigned my room and group of boys.
Our lessons, as I recall, were about the "heroes" of the Old Testament, the books of Judges and 1 and 2 Samuel. As I was still fairly new myself to these stories, I was learning right along with my class, just trying to keep at least a week ahead of them.
It wasn't long before I began to realize that these "heroes" were not really heroes, they were bloody, violent womanizing men, who seemed to have little if any regard for human life. My task it seems, was to be something of what today would be called a "spin doctor." I had to make these guys look good to my impressionable boys. It was hard.
Sadly however, we teachers seemed to be more concerned about trivial matters then about the real moral conflicts. Some for instances:
David vows to kill every male in the household of Nabal because Nabal had refused to provide him and his men with food (1 Samuel 25). We were more concerned with our boys' giggles over David's referring to these people as "any that pisseth against the wall" (25:34 KJV) than over their hero planning to slaughter innocent people.
David brings the Ark of the Covenant into Jerusalem (2 Samuel 6) and celebrates by dancing "before the LORD" with all his might, clothed only in "a linen ephod," apparently not a very modest garment and act. David's wife greets him with scorn, accusing him of exposing himself to the women like some pervert (6:20). David counters by cutting her off from sex for the rest of her life (verses 21 and 23). Honestly, we were more concerned about David dancing (a Baptist taboo) then about his cruelty to his wife.
And the story continues as David himself commits adultery and murder; then his whole family falls apart. One son rapes his half-sister, then her brother murders him and later leads a coup against his father. Civil wars follows -- violence and murder. David ends up a pitiful old man. I can't remember how I explained all this to fourth grade boys, or later to my own children. How can I even explain these matters to adults?
And then we have the passages that present David as "a man after God's own heart." How can we justify that statement?
Well first of all, the statement does not mean that David had a heart for God, but that God had a heart for David; in other words, it's not saying that David sought God, but that God sought David first! Compare the Hebrew construction in these three passages:
"... Yahweh has sought for Himself a man (literally) according to His heart." (1 Samuel 13:14)
"And his (Jonathan's) armor bearer said to him, 'Do all that is in your heart; you go first; look I'm with you according to your heart.'" (1 Samuel 14:7)
(David said to the LORD), "For the sake of Your word and according to your heart, You have done all this ..." (2 Samuel 7:21)
In all three, the expression "according to your (or his) heart" has the meaning of something like "as you choose" or "according to your choice." We would say that God chose David, a violent womanizer, an adulterer and murderer, a failure as a husband and father to be the object of His grace. And we're not told why.David's behavior is not commended or justified, simply recorded, as part of the history of God's chosen but sinful nation and of the family line of His Messiah, Jesus.
But David did have a heart for God; we see it in the Psalms he composed, as he pours out the longings of his heart.
God in the Bible does not present to us "good guys"; if we're looking for them we will be sorely disappointed. He rather presents to us a history of failures -- of fallen men and women, who occasionally demonstrate a great love for God and their fellow human beings. The people in the Bible are much like the people we encounter in history, or in the news, or in our churches. They are much like ourselves: people who have come to God as sinners and who have received and enjoy His grace.