“G-d benefited the midwives - and the people increased and became very strong. And it was because the midwives feared G-d that He made them houses. ”
Yocheved and Miriam risked their lives to save Jewish baby boys from being murdered by the Egyptians. Hashem rewarded them by making them ‘houses’ - Rashi explains that they merited to be the mothers of the lines of Kohanim, Leviim and Melachim. Rav Moshe Feinstein zt”l asks that if there main reward was these ‘houses’ then why does the clause, “and the people increased and became very strong” interrupt the description of their reward - since the ‘houses’ were the benefit described, it would seem that they should follow immediately afterwards and the passuk should have said, |”G-d benefited the midwives and made them houses.” He answers that their main reward was not the houses but rather the increase of the people since their true desire and joy was no more than the expansion of the Jewish population. Consequently after the passuk states that Hashem benefited them it immediately mentions the resultant expansion of the Jewish people - that was their main reward, the houses were merely a secondary bonus for their great yiras shamayim .
There can be a number of different reasons why a person performs an act of kindness - it may be because he knows it is a mitzvo to do chesed; it may be because he owes this person a favor, or it may be due to numerous other possible factors. We learn from Rav Feinstein’s pshat that the main kavanna we should have when we help someone (as well as the general intent to do a mitzvo) is that they benefit from our action. Yocheved and Miriam did not care about what reward they would receive for saving Jewish lives - they merely wanted the lives to be saved. Hashem rewarded them by enabling their actions to succeed and the Jewish people grew as a result.
Yocheved’s son, Moshe Rabbeinu inherited this same dedication to others. He saw the suffering of his people and risked his life to help them. He persuaded Pharaoh to give them a rest day so that they could observe Shabbos and furthermore he showed great concern for the sheep in his flock. It was in the merit of these actions that Hashem spoke to him at the Burning Bush and made him leader of the Jewish people. He wanted nothing more than to release them from the crushing slavery in Egypt, and his reward was that he merited to be the one to take them out.
This lesson is relevant in many areas of our lives, but perhaps is most important with regard to our careers. Many people are fortunate to be involved in a job which involves helping others, however it is quite easy to focus primarily on the money that they receive for providing their service. Rav Pam zt”l was once being treated by a dentist and he remarked at how much this dentist helped people in his profession. The dentist replied that this was a nice side-benefit to his job, implying that the main reason that he did it was to earn a living. Rav Pam replied that actually the money he earned was the side benefit but the ikar tachlis should be to help people have healthy teeth.
Unfortunately the tendency to over emphasize the financial aspect of maasim tovim can even creep into the most kadosh of activities such as learning and teaching Torah. The Mishna in Avos stresses how undesirable such an attitude is when it enjoins us “do not make it [the Torah] a crown to attain greatness with or a spade to dig with."  Many commentaries argue that the Mishna is not saying that it is forbidden to earn money through learning or teaching Torah for money however they all agree that this should not be the primary motive. The Rambam in particular emphasizes the abhorrence of being involved in Torah in order to earn a parnasa. However even he does not rule out learning or teaching if a person has the ideal kavannas. In Hilchos Shemitta v’Yovel he writes that Shevet Levi are separated from everyone else so that they can “serve Hashem and teach His just ways and His righteous laws to the public, as it says, ‘they will teach the laws to Yaakov and Your Torah to Israel.’” He continues that such a role is not limited to Leviim alone, but that anyone who is willing to learn Torah with similar motives is worthy of assuming the same function. The Chofetz Chaim zt”l writes that such a person is allowed to receive money for his learning Torah and it would seem that the reason for this is because there is no danger in his being motivated by ulterior motives.
We know that the ultimate reward for Yocheved and Miriam would be in Olam HaBa - the consequence of their pure motives. If a person does chesed with such motivations then he can assure himself of ample benefit in Olam HaBa. The Atler of Slobodka once noted the mesiras nefesh of bakers - in that time the baker would rise very early in the morning in order to provide bread for the community. They were performing an incredible act of kindness by getting up so early in order that people would have this vital commodity. However, he commented that if the baker is doing it solely in order to earn a livelihood then he is losing his main source of Olam HaBa. Performing acts of kindness is a great thing and merits great reward, but let us not lose focus of what our kavanna should be - to help others. The side benefits will come, but improving the lives of our fellow Jew is ample reward in and of itself.
 Shemos, 1:20-21.
 Darash Moshe, Parsha Shemos.
 Avos, 4:5.
 Hilchos Shemittah v’Yovel, Ch.13, Halacho 12-13.
 Biur Halacha, Simun 156.