What the first reading calls aliens are immigrants or newcomers. They lived among the Hebrews, but were not Jews themselves. The Lord reminds the people that they were once aliens themselves.
They should not make the same mistake the Egyptians did when they mistreated the Israelites. God uses the same logic in commanding them to take care of widows and orphans. Treat them like family, or else your own wives and children will be in the same situation.
The reason for such compassion should be deeper than just fear of punishment. Jesus said, “You shall love your neighbor as yourself” (Matthew 22:39). He called this the second commandment. The first is to love God wholly and completely, heart, mind, and soul. If the second commandment is the Golden Rule, the first might be called the Diamond Rule. If you think about it, in order to keep the first commandment, you have to be keeping the second as well.
Jesus said that whatever you do for the poor, the homeless, the sick, or prisoners, you do for him (Matthew 25:31–46). We can’t really say we love God if we don’t love the people God created.
So that gives us two reasons to love our neighbor. First, because God lives in other people, so loving God means loving God wherever God is found. Second, God loves them, so if we are to be holy, we must be like God. What does that mean? Remember the saying that “charity begins at home”? It doesn’t end there. If we truly love God, we will extend our charity to those outside our homes. People are probably still rebuilding after earthquakes, tornadoes, floods, and other disasters, and every city has some kind of homeless shelters. You say you love God? Let’s see you love your neighbor.