David's able to succeed as king because of the utter loyalty of his subjects and God. God sticks by David in just about everything he does, getting his enemies out of the way whenever the nation's threatened. In turn, David is very clear about his own loyalty to God and encourages the people to devote themselves to God as well. David's subjects go to great lengths to support him, to the point of regularly risking their lives. This loyalty is justified, as you can see what a mighty and just king David turns out to be.
Questions About Loyalty
Take a look at the books of Samuel and Kings. Is David's story filled with all kinds of loyalty there? Or has the Chronicler really smoothed over things?
If you're loyal to God, he'll be loyal to you. Does God really work like this? What would happen if both sides in a conflict were loyal to God?
After God and king, who should the folks in Israel give their loyalties to? Tribe? Family? Self?