Because dealing with crime is one thing, and dealing with sin is another. A Christian who repents of his murder has had his sin dealt with, but not his crime.
David was charged with the crime of murder, but being the highest human authority in the land, ultimately, his fate was up to God, both...