“But the territory of the children of Dan was lost to them.” The real story is given in Judges 1:34. The Danites could not, or would not, defeat the Amorites who lived in the territory assigned to Dan, so the Danites went north and conquered Laish, which they renamed “Dan.” That turned out to be a very poor decision for them because they became the first tribe attacked by every army that came from the north: Syria, Assyria, Babylonia, Persia, Greece, and Rome. They were effectively wiped out by the Assyrians around 725 BC, and archaeological surface surveys of the Galilee show very little organized occupation for many years after the Assyrians came through.
The Hebrew text plays with the words to make the action of the children of Dan stand out. The text says that “the territory of the children of Dan ‘went out’ from them;” and also that the “children of Dan ‘went up’ and fought.” The words, “went out” and “went up” have been used to describe the direction of the borders or the tribes, but now Joshua uses them to describe the people of Dan.
“Leshem.” Called Laish in Judges 18.
“the mouth of the sword.” Used to show great destruction, as if the sword was eating its victims (see commentary on Josh. 6:21).
“their father.” Here “father” is used commonly of “ancestor.”