We think when God fulfills something, it’s kind of a big picture generic kind of fulfillment and then we flesh it out. But the Lord works in greater ways than we can ever understand.
David’s last words were declaring the goodness of God and reflecting on the Lord had established him. Read this description (2 Sam 23:5):
“Is it not true my house is with God?
For He has established an everlasting covenant with me,
ordered and secured in every detail”
God established David and his covenant with him in a way that was “ordered and secured in every detail.” So did that mean everything in David’s life was from God? No. David blew it. Often.
But it does mean that God worked in such a way as to establish His covenant with David in a very orderly and detailed way. God fulfilled his promise in an ordered and detailed way.
There are things he does we don’t understand. God is not a good of disorder and generalities, but His promises are ones that come with great order and detail that we don’t even know about.
And why should be surprised? His ways are expressed in nature everywhere. But what it means is that we can also trust His promises for us as well.