Now these are the heads of the mighty men whom David had, who gave him strong support in his kingdom, together with all Israel, to make him king, according to the word of the Lord concerning Israel (1 Chronicles 11:10).
Did the mighty men help to make David king? Yes. Did they do this of their own initiative and power? No. As the Scripture says, This was "according to the word of the Lord concerning Israel."
We must be careful that when we read passages like this, we are not quick to wish to be a mighty man or to be surrounded by mighty men. Remember, that before David was surrounded by these mighty men, he was simply a boy with a slingshot. Gideon did not seem so mighty before God declared Him to be so. Samson could do nothing after his hair was cut.
As mighty as these mighty men were, their might and effectiveness came from the LORD. And David's rise to the throne was because God determined that he would be king.
Consider another similar text in the New Testament:
For truly in this city there were gathered together against Your holy servant Jesus, whom You anointed, both Herod and Pontius Pilate, along with the Gentiles and the peoples of Israel, to do whatever Your hand and Your purpose predestined to occur (Acts 4:27-28).
The disciples recognized the treachery of the Jewish leaders, Herod, and Pilate in the crucifixion of Christ, but then they confess that all these things were already ordained to happen in just such a way by God. While those who conspired and crucified Jesus were responsible for their sinfulness, the particular acts that led Jesus to the cross were already ordained by God. God was always in control. This was His chosen means to achieve salvation for His elect.
In the same way, even though the mighty men were used to gain and establish David's reign as King of Israel, God must receive all the glory because He ordained and made it so, simply using these mighty men as the means. Could He have done it without the mighty men? Yes. Therefore, the credit is not to the tool but the One who wields it.