The Lord appeared unto Abram, to encourage and comfort him against his wicked neighbours: see Gen_13:15 15:18 17:8 24:7 Deu_34:4.
There built he an altar, a place for sacrifice, and other parts of Divine worship, erected by him both to keep his family in the true religion, and to separate himself and them from that idolatrous neighbourhood.