Why did Avraham bow to them?
Ohr ha'Chayim: He showed that he does not consider himself their king. Rather, they are more honored than himself!
Why does it say "l'Am ha'Aretz li'Vnei Ches"?
Ha'Emek Davar: First one honors the Rabim (the people of the city), and then the esteemed among them.