If Reuven tells Shimon he is going to do something and Shimon thinks that Reuven is making a mistake, he will try to persuade him with logical and emotional arguments not to do it. That is what it sounds like Avraham Avinu is trying to do with Hashem when Hashem tells him that he is going to destroy Sdom and Avraham tries to convince Hashem not to destroy Sdom. However, Hashem is not a person who can be convinced. Hashem is perfect and omniscient and therefore by definition you can't change Hashem's mind and you are not going to raise an argument that he hasn't already considered and rejected. Given the above, what was Avraham Avinu trying to accomplish with his back and forth with Hashem? <br>
<br>In truth, this is really the age old question about tefila, if Hashem is omniscient and perfect what is the point of davening? Hashem knows exactly what we need/want and we can't, so to  speak convince him to change his mind. One answer given by a number of rishonim and acharonim is that tefila is for us, it makes us better people, changes us, makes us into a new person. Therefore, whatever din we had was on the old person but the new you now gets a new din which hopefully is better. However, this doesn't explain why Avraham Avinu would have an argument with Hashem and try to convince him to change his mind using logical arguments (the same applies to Moshe Rabenu when he tells Hashem, what will the Egyptians think if they hear that Bnei Yisrael were destroyed in the Midbar). <br>