The Gemara in Masechet Sota discusses many of the details involving the exodus from Egypt. There is an interesting observation made in connection with Moshe Rabbeinu, and how he personally dealt with bringing the remains of Yosef to Israel.
It took an effort on Moshe’s part to locate these bones, that the Egyptians attempted to hide. It was clearly an act of love and sincerity, with no expectation of reward.
The point of the Gemara is that every meritorious act is rewarded by G-d. The reward is according to the stature of that individual, that clearly shows he is being compensated for his good deed.
In Moshe’s case, there was nobody who existed that was on his level. He was the greatest man alive, and whoever lived.
For this reason, we are told that only Hashem, Himself, could give Moshe his just reward for caring for Yosef. He did this when Moshe passed away. The Torah tells that it was G-d, Who buried him, as nobody knows the exact burial spot of Moshe Rabbeinu.
This little episode is a reminder of the ultimate justice that exists in the world. Every good deed will be rewarded according to the level of that person. We are not supposed to look for the reward when we do something nice for someone. But we are supposed to realize that it is duly recorded in Heaven, and justice will prevail.