From Dan to Beersheba
Here’s what it means
The phrase means throughout the whole land of Israel from north to south.
Why the Bible says it this way
An idiom is a familiar phrase whose meaning comes from the whole expression, not from reading each word by itself.
A helpful detail: The two boundary locations name the full national territory between them.