wouldn't their disappearance be good for everyone
Well, the well-being of everyone is independent of their existence. One's fate is sentenced on Rosh-Hashana, for Tzadik or Rasha, or on Yon Kippur for Beinoni. That sentence applies till next year (with measured dynamics :-) ).
If they're doomed for Gehenom, their own sake is to do Teshuva, which is enabled only in their lifetime.
keeping those who are thoroughly wicked alive is not really a kindness
since they will eventually damage others as the gemora says "He who is
merciful to the cruel is destined to be cruel to the merciful"
Off the top of my head, as Double AA and Tamir Evan indicated, he prays for the righteous. However, regarding Tamir's comment that it seems that the prayer is also for the whole place (
האף תספה ולא תשא למקום למען חמשים הצדיקם אשר בקרבה), I'd say that the verse explicitly says that it's for the Tzadikim
למען חמשים הצדיקים. Also, in the next verse:
חללה לך מעשת כדבר הזה להמית צדיק עם רשע והיה כצדיק כרשע, it's again clear that the essence of the prayer is the righteous' lives.
So, why also save the whole place? Maybe because Avraham also prays for their living-conditions. If the city gets destructed, the Tzadikim lose their house, the close-by market, their fields... Inevitably, they also suffer from the punishment.
אוי לרשע ואוי לשכנו, woe to the wicked and woe to his neighbour. Avraham prays for the whole place so that the slightest harm won't reach the Tzadikim (the words
אשר בקרבה, are maybe used to emphasize the strong connection between them and their city).
i dont think one can answer: "to give them time to repent", because we
see that they were thoroughly wicked, as when they attacked Lot (all
of them came out, from young to old)
But that only happened after the prayer. Even Gd has decided to "go and see with own eyes":
ארדה נא ואראה הכצעקתה הבאה אלי עשו כלה ואם לא אדעה
and Unklus translates to
אעביד עמהון גמירא אם לא תיבין ואם תיבין לא אתפרע
I'll eliminate them if they don't make Teshuva but if they do I will not.