David promises to keep “דרך חקיך” עקב. That’s ambiguous; Artscroll translates it as “step by step” and that goes with the previous pasuk, דרך מצותיך ארוץ.
The 1985 JPS translation is “to the utmost” (a metaphoric translation of עקב as “heel”) but adds “meaning of Heb. uncertain”.
But Ibn Ezra cites another pasuk in תהילים:
So the first pasuk here could mean “I will keep it for its ultimate reward”.
I always say that ambiguity in poetry is intentional. David starts us thinking in terms of “steps”, continuing the thought from the previous stich, but then forces us to think in a new direction with הט לבי אל עדותיך; ואל אל בצע. Now it is clear that he is talking about rewards; we should not be looking for בצע, profit, or (in the next pasuk) העבר עיני מראות שוא. We had previously discussed learning Torah for the wrong reasons, for the intellectual thrill. Here is another danger: Torah for profit.
The mishna in נדרים says that if I make a vow not to accept any benefit from you, then you may not teach me and my children מקרא but not מדרש. The gemara then concludes that מדרש must not have any financial value:
The Rambam is pretty strict about this:
But it is clear that we do pay rabbis and teachers, and many commentators have struggled with this.
I think the bottom line is that it is the community’s responsibility to support Torah learning and there is no prohibition against accepting such support. David’s point here is about attitude: learn Torah because תאבתי לפקדיך. It is forbidden to go into חינוך in order to become rich; if it works out that way, great (that’s a joke).