Abraham saw it unfair to punish the righteous for the unrighteous (in our day we say the innocent suffer for the guilty). Abraham agrees that wickedness was all through Sodom, however with God being the God that he is, being judge overall mankind, it is only right (in Abraham's eyes), to spare the lives of the righteous, therefore not treat the wicked and righteous alike. There should be a differentiation and God being a righteous God should know better (so to speak).