Preparing to build the Temple required gathering the finest raw materials on a massive scale. To meet this need, David arranged for an unmeasurable supply of cedar wood, gathering an amount so large it could not even be counted. The difficult job of transporting all this timber was assigned to the people of Sidon and Tyre, who operated under the leadership and protection of Hiram, the king of Tyre [רש״י, רלב״ג].
David chose to rely on these specific nations because they possessed a unique, highly specialized skill in cutting and processing timber. The trees themselves were harvested directly from the forests of Lebanon, as these lands fell within the borders of Hiram's kingdom [רלב״ג].