“These are the men whom David put in charge of the service of song in the house of Yahweh, after the ark rested there. They ministered with song before the tabernacle of the tent of meeting, until Solomon had built the house of Yahweh in Jerusalem. There they performed their service in due order.”
David was associated with songs, music, and psalms. Thus it does not seem strange that he should appoint Levites to sing songs in the house of Yahweh. The problem is that the house of Yahweh was only established under Solomon. Therefore, this section talks about songs around the tabernacle in the tent of meeting. However, once the temple was complete, they performed there.