Rashi writes that there were people who did not believe the story we learn in Midrash that Avraham had been miraculously saved from the burning furnace that Nimrod had thrown him into. Maybe they thought Avraham had great PR, great marketing, and this was all an exaggeration. G-d therefore made a miracle in our parsha and enabled the King of Sdom to miraculously escape from a lime pit during the war of 4 kings against 5. Once people saw that miracle, they retroactively had faith in Avraham's escape as well.
Ramban asks: if anything, the fact that the king of Sdom was saved should weaken people's emunah, not strengthen it. If even the King of the most wicked city on the planet can have an escape that defies natural explanation, then how is Avraham's escape a proof of his tzidkus, his philosophy, his vision?
Mizrachi gives the answer that probably is pashut pshat in Rashi: people had no belief in the concept of a miracle occurring until they saw it happen to the King of Sdom. Once they grasped that such a concept was real, they could believe something similar happened to Avraham.
Maharal in Gur Aryeh explains that had it not been for Avraham's intervention, "team Sdom" would have been routed in the war. These kingdoms had been subjugated for years and their attempt at rebellion was a failure. Had G-d wanted to help Sdom, the time for it to happen was long before the lime pit episode. The only reason for the miracle, the only reason for King Sdom being saved, was because Avraham was now fighting on his side.
The Chidushei haRI"M uses this question of Ramban to teach us something fundamental about faith. If all that was in the news was the miracle of Avraham being saved from a furnace, something extraordinary that no one could help but marvel at, then accepting the truth of Avraham's message would be a no-brainer. For faith to be real, there has to be a possibility to choose not to believe.
For people to have "faith" / emunah in the miracle of Avraham's escape, there had to be a similar miracle that occurred to the King of Sdom in order to level the playing field. Counter intuitively, there had to be something that would give people a reason not to believe in order for their faith in Avraham to be real.
We find a similar idea in Ramban in sefer Shmos. G-d did not remove Pharoah's bechira by hardening his heart, explains Ramban, but rather he restored his bechira. If all you see is miraculous plagues, then choosing to obey G-d is a no-brainer. G-d muted the influence the plagues had on Pharaoh by hardening his heart in order to give him the option to disobey, so that he would have a true choice.
Ch haRI"m ends with an interesting historical observation. He writes that the "olam" says that when the Besh"T revealed himself to the world there was a big tumult on high because the scales had been massively tilted in favor of greater avodas Hashem. Therefore, a certain "lamdan" (the word he uses) had to come on the scene to take the opposing side to the BesH"T to balance things out. Wow.
Now for my 2 cents: you need look no further than next week's parsha to find an example which seems to undermine the whole basis of the Ch haRI"m's argument. Is it really true that given the example of an undeniable miracle people have no choice other than to believe? The sons-in-law of Lot witnessed masses of people who ganged up against Lot being stricken with blindness by the angels, yet they still mocked the idea that Sdom would be destroyed. They were so confident that they did not even leave town just as a matter of hedging their bets. Why didn't the overt miracle convince them?
You have a whole week to think about that (or read this post from a decade ago). Maybe I'll come back to it next week.
On to another point regarding emunah, also from the Ch haR"M, a point which he calls "ikar gadol b'avodas Hashem," and which puts the previous idea in a different light.
Hashem promised Avraham that he will be the father of a great nation. Avraham responds (15:6), "V'he'emin b'Hashem va'yachshiveha lo tzedaka." Who is the "lo" referred to in the pasuk? Rashi interprets the pasuk to mean that Hashem gave credit to "lo" = Avraham for his unquestioning belief in Hashem's promise. Ramban disagrees with Rashi's pshat. Does a great navi like Avraham get credit simply for belief? Ramban instead argues that the pasuk means that Avraham gave "lo" = to Hashem credit for promising him children independent of his merit -- it was a pure act of love and benevolence.
Ch haRI"m combines elements of both peshatim to arrive at a third approach. He reads "lo" as referring to Hashem, like Ramban, but he reads "va'yichashveha" as referring not to the promise of children, but rather to Avraham's faith in G-d, like Rashi.
What comes out of this peshara is an amazing reading of the pasuk: Avraham was thanking Hashem and giving Him credit for giving him the strength to believe in Hashem's words.
The first Ch haR"IM we learned gave the impression that belief is a product of free choice of the individual. This Ch haRI"M sends us in a completely different direction and teaches that ultimately, belief is a gift bestowed by Hashem.
I don't think there is a contradiction here. In its initial stage a person feels that he/she is choosing to believe, to accept G-d. At some point the person progresses in their faith to the point that they see everything as the product of yad Hashem, even their initial choice to accept G-d in the first place. It seems paradoxical -- I don't know if I've done justice to the idea. It's striking that both yesodos appear in the same parsha.