Remember that you were slaves in the land of Egypt. That is why I am giving you this command.
Deuteronomy 24:22 (NLT)
Many of the codes listed in Deuteronomy 24 deal with justice and compassion the people of Israel were to observe in their business dealings with others, especially the poor. God gives Israel a reason for observing these regulations in verse 22. They should have compassion on the oppressed and needy because they were oppressed themselves and needed God to deliver them from slavery in Egypt.
The heart of compassion was not based in the how great they may become, but in their own history of neediness. No matter how much their nation prospered they needed to always remember this. Loosing sight of this would inevitably create a hierarchical system of benevolence that dehumanized those in need. Remembering their own need would create a healthy bond of identity between the benefactor and the beneficiary.
In the same way my compassion for the poor needs to be based in the realization that I have been freed from bondage to sin and the unjust system of this world by the grace of God through the work of Christ. I am no better than the one receiving my charity or my acts of justice. We share a common bond of being people in need of compassion that connects us much more strongly than any act of benevolence can. I and the beggar are one.