When Terach began his trek from his hometown, his destination was the Land of Canaan. The Torah never explains this migration, never gives us any insight into Terach’s motivation. The only information we are offered is the make-up of the travelling party: Terach uproots his son Avraham, his daughter-in-law Sarah, and his orphaned grandson Lot, only to stop short of his stated destination and remain in Charan.
At some later juncture, Avraham heeds the Divine call and heads for an unknown destination – which turns out, ironically, to be the land of Canaan. Although Terach remains in Charan, Lot tags along with Avraham and Sarah. Once again, we have no information regarding Lot’s reasons for this second relocation: Was he merely an adventurer, always eager to explore new lands and new cultures? Perhaps Avraham’s personal charisma or the holiness and spirituality of Avraham’s household attracted Lot, or perhaps Lot simply choose to maintain his ties with his closest living relative, his sister Sarah.
Whatever his motivation may have been, as they continue their travels it becomes clear that Avraham and Lot are incompatible, and that they must part ways. Avraham suggests that Lot establish his own homestead, offering him the length and breadth of the Promised Land. Instead, Lot choses neither the north nor the south, as Avraham had suggested, opting instead to travel east and settle in Sodom, a place that reminds him of Egypt. 
What is the nature of this similarity? The Torah describes the terrain and the abundance of water, but was there something more about Sodom that attracted Lot? Could he perhaps have been nostalgic for the things they had recently experienced in the kingdom of the pharaohs? Although their visit there had made Lot and Avraham rich men, they had just barely escaped intact from the corruption and immorality, from the system of power and cruelty that had nearly cost Avraham his life and Sarah her freedom and honor: Shortly after their arrival in Egypt, their hosts took an unhealthy interest in their female guest, and snatched her away from her family. It seems this sort of behavior was a deep-seated Egyptian characteristic; years later, Yosef was subjected to very similar treatment. Could this have been what attracted Lot to Sodom?
It should come as no surprise that the consequences of Lot’s choice are tragic: By choosing Sodom, Lot turned his back – literally, in a geographical sense, as well as figuratively, in the moral and spiritual sense – on the greatest man alive. He distanced himself from Avraham and Sarah, and instead sought out a place that represented the very antithesis of Avraham and Sarah’s tent. At one time, Lot might have been considered Avraham’s heir-apparent, but from the moment Lot departs for Sodom, that is no longer an option: When Avraham pours out his heart to God and laments his infertility, he mentions his chief steward Eliezer as his only potential heir; Lot, his ne’er-do-well nephew/brother-in-law, is no longer part of the equation.
Eventually, Lot’s poor choices rebound on him, with a vengeance: Even when he tries to imitate the hospitality he learned from Avraham and Sarah, the results are a grotesque caricature of true hesed: Rather than a wholehearted invitation, Lot’s heavenly guests are shown the door out before they even step in.
Please, my lords, turn aside to my house. Spend the night, bathe your feet, and then continue on your way early in the morning. (Bereishit 19:2)
Lot invites the guests to stay, yet strongly hints that it would be best for them to leave early in the morning. His invitation seems perfunctory, half-hearted, lacking warmth and conviction. Once the guests acquiesce, Lot’s neighbors demand to “get to know” them (in the biblical sense).
I have two daughters who have never known a man. I will bring them out to you; do as you please with them, but don’t do anything to these men. After all, they have come under my roof!' (Bereishit 19:8)
Lot’s pathetic attempt to mimic Avraham’s hospitality is nothing short of bizarre: He readily sacrifices his daughters to the marauding crowd, perhaps seeing himself as the hero of an alternative Akeida.
The crowd responds with an interesting and unexpected accusation:
This man came here as an immigrant, and now all of a sudden, he has set himself up as a judge! (Bereishit 19:9)
Here, then, is the crux of the matter: Lot came to Sodom to be a judge. When measuring up his options, he decided that it would be preferable to be “chief rabbi of Sodom” rather than play “second fiddle” and live in Avraham’s shadow. Sharing such close quarters with a spiritual giant can make a certain type of person feel small and inadequate; Lot preferred to strike out on his own, to settle in a place where expectations would be lowest, a place devoid of spirituality, a place that would make him look good in comparison to those around him. In Sodom, Lot could shine.
Unfortunately, Lot’s plan backfired. By choosing to live in a corrupt and immoral environment, Lot became estranged from both his immediate and extended family, and eventually became the victim of his children’s failed education and the warped morality they had internalized in their hometown. Lot’s daughters, who clearly had no feelings of tenderness or loyalty toward the father who was willing to throw them to the wolves, displayed their own version of Sodomite morality: When their father was most vulnerable, they used him for their own purposes, plying him with drink and raping him. The image of Lot with which the Torah leaves us is of a drunk, humiliated and violated man – but one who, we might well imagine, still took pride in the highlight of his resume - his position as judge or “chief rabbi” of Sodom.
For a more in-depth analysis see: http://arikahn.blogspot.co.il/2015/10/parshat-vayera-essays-and-lectures.html
 See Rashi, Bereishit 11:29.
 Bereishit 13:10.
 Bereishit 12:15.
 Bereishit 39:7-13.
 Bereishit 15:2.
 Bereishit 19:5.
 Lot is described as sitting “in the gate of Sodom,” which connotes a judicial position, or, at the very least, a position of civic importance. See Rashi, Bereishit 19:1, and commentaries on Rashi.