It is a charming picture of a God who does not quite know what the situation is; to this God Abraham addresses himself with some courage, endeavouring to protect the city, by arguing that there might be fifty righteous people there, and that it would be unreasonable to destroy it if that were the case. God agrees that for fifty such the city will not be destroyed; but the matter does not end there, and Abraham, deferentially but firmly, beats God down, step by step, to agreeing to spare the city if they can find just ten innocent people. There the matter ends, and the story takes a different turn.
What can we say about prayer? Clearly, according to this-story, prayer is not a matter of magic; it is not that if you put in so many hours of prayer, or over several days utter the right formula, a particular result can be guaranteed; that would be pagan superstition. Prayer is something far more extraordinary than that; prayer, almost unbelievably, is a matter of a relationship between the Creator of All That Is and the insignificant human beings that we are (insignificant, that is to say, except to this extraordinary God).