The end of 2 Samuel represents the conclusion of David's effective reign over Israel. Much of the last few chapters recount the great days of David's life and ascension to the throne.
But then there's chapter 24. Go ahead and read it.
There are so many challenging aspects of this story, it's impossible to cover it all here. In the end, we have to trust that God always acts within his character, and so whatever he did here, he did within his love, mercy, justice, and righteousness. It's a matter of our trust in him.
Which really is the whole point of the story.
David "counts" Israel. This is technically not a census - a mere counting of heads. It's a detailed and organized military resource assessment, enacted by the leaders of David's army.
But those commanders know that it's all wrong. In fact, it doesn't take David himself long to recognize that what he had done by this assessment was, in fact, wickedness and sin.
Why? We're not told outright exactly why this is a sin for David. Others in the Old Testament had done the same thing, and it wasn't judged a sin. So why here?
It's not a stretch to figure out the answer. This was sin for David because of one thing: he didn't trust God. There was no threat. There was no crisis which motivated the counting. David just didn't trust. His mistrust lead him to assess his military readiness, instead of resting in God's ability to protect.
You can see from reading the chapter that the consequences for David and all of Israel were very grave. As is the case for all sin.
All sin has its background in the same mistrust of God. Name any sin that comes to mind, and you will be able to trace its origin in a lack of trust in God. Even in David's life, every sinful episode in which he failed to make a righteous decision is prompted by his lack of trust. The same is true for us.
So how do we engage in a trust habit that can minimize the possibility of sin? Here are four disciplines that can help:
Proverbs 3:5-6 (Benson Paraphrase)
Trust in the Lord with all your heart and don't lean on your own understanding. In all your decisions, bring him in on the matter - trust him - and he will set you on the right path.