God had still kept His promise to Sodom, and it was destroyed. It was destroyed because the city was okay, or because God had nothing better to do. It wasn't because God had just idly picked out Sodom from other cities, but God had taken out Sodom because of their evil ways. God judged Sodom, and judged the city properly. In Genesis 18:25, a very profound statement is made. "Shall not the Judge of all the earth do right?" God is the perfect Judge, and He always judges perfectly and righteously.
There may be times when we would question God's judgment, but the truth is, God always judges completely fair, never biased, unlike human judges. We must also realize that God will judge this world, and that Sodom was just an example, every person will bow their knee and everyone will confess Jesus as Lord (Philippians 2:10). God promised judgment to Sodom and He promises it to this world. Justice will be served!