But again, societies and cultures do change over time. Most (not all) would agree that certainly during the TOS time period money/compensation existed. There is no indication as to how long the "spirit of volunteerism" had existed (if it even did) prior to Encounter At Farpoint. In the time period of TNG-DS9-VOY you're only talking about a fourteen and a half year time interval in Human history, just as you can't tell how long the spirit of volunteerism had existed, you also don't know how long it will last.
Kirk didn't work as Starfleet captain because the pay has been so good that he could retire early or buy that nice apartment with a view over the San Francisco bay. He was actually pretty miserable while he lived there and had more luxuries than ever before: more living space, a comfortable desk job. And he was miserable again when he was in the Nexus, a happiness machine. Kirk worked and died (the very opposite of hedonism) as captain because it was his "first, best destiny".
You cannot state it more clearly via the biography of a fictional character that hedonism and happiness (in the sense of immediate fulfillment of your dreams) are not that important. Here
is my favourite philosopher talking about the issue.
If I remember it correctly having witnessed the horrors on Tarsus IV made the guy become captain. And while these altruistic and idealistic motives were surely always present he became simply used to it over the time and didn't feel at ease doing anything else (TWOK, GEN), i.e. not only selfless and idealistic people tick like Kirk.
You come from a military background so tell me why people do this soldier job, only for the money or also because there are notions like honour, duty, serving the country and so on? The Kirks are not utopian, they are all around us. Every workaholic I personally know is addicted to the job and not the money that comes along with it (not to mention that working hard doesn't always lead to more income).