David is also a perfect example of how congregations work.
If you are "somebody" there is nothing you can do that will merit any punishment, as long as you are "repentant", or as one elder told me personally, "Just claim a moment of weakness, and then make a sizable $$$$$ contribution to the congregation. You'll get off with a slap on the wrist at the most."
On the other hand if you are just a chair warmer as the elders where I used to attend called anyone who was not "someone"; it won't matter how small the infraction is, you will never be "repentant" enough and will face the harshest of punishments from these Pharisees.
They are just imitating the examples in their Bible.