"You shall not despise an Egyptian": Why? (Ibid.) "because you were a stranger in his land." R. Elazar b. Azaryah said: The Egyptians accepted Israel only for their own benefit, notwithstanding which the L-rd stipulated reward for them (here). Now does this not follow a fortiori, viz.: If one did not intend another's benefit and benefited him nonetheless, Scripture considers it as if he had benefited him, then one who intends to benefit him, how much more so!

R. Shimon says: The Egyptians drowned Israel in the sea, and the Edomites accosted Israel with the sword, yet Scripture forbade their entrance (into Israel) only until three generations. The Amonites and the Moavites, because they took counsel to cause Israel to sin, Scripture forbade their entry forever! — to teach that it is worse to cause a man to sin than to kill him. For one who kills a man removes him only from this world, whereas one who causes him to sin removes him from both this world and the world to come.