Thrown right into an example of why you would dread being king. David administers justice for the Gibeonites, a tenant of the original occupiers of the land, which means allowing them to kill 8 Israelites. He handles it and as fairly as he can, seeing that they get a proper burial and the families are looked after.
The story is framed a bit like an Aztec style human sacrifice. There is a famine in the land until it is done, and the doing of it brings prosperity again.
But I think it’s a lesson in justice, justice requires death. Jesus’ death could be viewed as a human sacrifice. The blood is not purchasing of some rain and blessing from God, it’s righting a wrong.
Then there is the story of the Israelites being the giants, relatives of Goliath. This is bridging the story of David round in a big loop from the first demonstration of his greatness, when he slew Goliath, to the decline of it. Israel is starting to slay their own giants without him.