We are commanded to treat sojourners well because of the events of the exodus and because we know the vitality of the sojourner. This is one of the rare examples of commandments being explained or elaborated upon.
[Aleksandr Sigalov:] One thing that my friend forgot to mention in this video was that we are to have ONE LAW for us and the sojourner. This disproves the rabbinic lie that there are some special "noahide laws" for non-Jews. Torah prophecies that all nations of the Earth will come to the Written Torah eventually, which means that we must educate non-Jews in ALL the Torah, not just the Genesis part of it.