Originally the name of a distant western town, written with the city radical 阝. A far-off place became the pointer for far-off things: 'that one over there'.
这 this vs 那 that — the fundamental near/far pair. Sentence-initial 那 means 'well then': 那我们走吧 'then let's go'. And 那个 nèige, stretched out, is the great Chinese filler word — the 'um' you'll hear everywhere.
A far-away CITY 阝 — point at it: THAT.
As a filler, 那个 shifts pronunciation to nèige — foreigners are often startled to learn it's just 'um'.