‘ And Joshua said to the children of Israel, “Come here, and hear the words of YHWH your God.” '
Possibly ‘here' meant before the Tabernacle, as he spoke in God's name. He wanted them to be aware that his words were from YHWH Himself. He was YHWH's mouthpiece.