
Much of the 'history' is a retrospective attempt to give legitimacy to land claims or to give credence to the claim to power and authority of dubious regimes, or supremacy over neighbours, of course. Giving this spurious credence to despots and insecure rulers of one form or another has frequently been the role of 'historians' and 'genealogists' throughout history, no less in Canaan and the Levant, than in more recent times and places.
The problem is, much of this 'history' was written by people who knew little or nothing of actual history, so they made what can only be described as wonderfully anachronistic schoolboy howlers. Not that they expected their readers (or mostly listeners) to realise this of course. They would have been equally ignorant of real history.