I mean, David literally had a thousand wives and concubines and he still had to go and fuck one of his best soldiers' wives.
He got her pregnant and then orchestrated the guys desth to cover up his sin, the baby was cursed to die, and the second the baby died, he was just like, "Okay, cool, I'm over it" and he's still considered the beloved of God.
The gist of the story is that people that are pointed to high places and have heroic unbelievable achievements can make horrible mistakes and still be forgiven by God as long as they repent.
Nobody is perfect, not the undefeatable giant Goliath, nor the beautifully-hearted musical genius hero warrior king David of Israel.
Anybody whose understanding of David stops at, He killed Goliath with a slingshot" doesn't deserve any sort of authority when it comes to interpretation of the Bible.