I have read the account of Abraham quite a few times, but I never noticed something before that I noticed this time around: namely that God used the circumstances surrounding Sodom and Gomorrah to teach Abraham a very important message about the nation he was going to father. Part of God's covenant with Abraham was that he would become a great nation. In fact, this was God's means of starting over with His plans for redemption. In the past, everything had gone downhill quickly. So God used the sin of Sodom and Gomorrah as a teachable moment.
It's interesting to see that God chose Abraham so that "he [might] command his children and his household after him to keep the way of the Lord by doing righteousness and justice…" (Genesis 18:19). By sharing the situation of Sodom and Gomorrah with Abraham, God was revealing what would happen if Abraham's family went down a similar path.
In a similar way, I can look back at my life and see circumstances that God used to prepare me for the future. Often I didn't understand what was going on in the moment, but it was by His grace that He helped me to be prepared for what would come next.