Accompanying a Jew at the beginning of their journey is a Mitzvah. It guarantees that no harm will befall them as they go. Yet as a result of Pharoh walking 4 steps to escort Avrohom, the Jews become enslaved for 400 years in Egypt.
Sources:
Bereishis Vayeshev Perek 37 Possuk 14.
Commentery of Rashi and Baal Haturim
Bereishis Vayechi Perek 50 Possuk 7
Commentery of Baal Haturim
Gemara Sotah 46 B
End of Tosafos Sotah 42 B ‘Meah Popei’
Bartenura begining of Pirkei Avos