I believe Abram did this because of these reasons.
The king of Sodom was a politician. He was not a honorable person so Abram didn't want the money from Sodom. Sodom was evil.
I believe that the king of Sodom wasn't being kind but wanted to trick Abram. He wanted to control Abram.
Abram wanted God to control of his life and didn't want the king of Sodom to control him.
I believe that we need to be lead by God. God needs to receive the glory. God wouldn't receive the glory.
If we can't do something that glory the Lord, then we shouldn't do the thing.
There were other reasons. We need to trust in the plan of God, God's plan is the best. We don't have the same thought that God has.
Abram was lead by God. We need to be lead by God. God has great rewards for his followers.
21 The king of Sodom said to Abram, “Give me the people and keep the goods for yourself.”
22 But Abram said to the king of Sodom, “With raised hand I have sworn an oath to the Lord, God Most High, Creator of heaven and earth, 23 that I will accept nothing belonging to you, not even a thread or the strap of a sandal, so that you will never be able to say, ‘I made Abram rich.’ 24 I will accept nothing but what my men have eaten and the share that belongs to the men who went with me—to Aner, Eshkol and Mamre. Let them have their share.”