David commanded to gather together the foreigners who were in the land of Israel; and he set masons to hew worked stones to build the house of God.
In this light, the following paragraph must be read as the Chronicler's true and accurate statement of the things David did and said, but not as proof that David was totally correct either in his words or deeds.