Just like learning to play an instrument -- it isn't just possession of a hard-earned skill that makes you happy, it is knowing that you can put that skill to use to make music that you enjoy listening to, and performing for others. That impromptu guitar or piano performance at a random cocktail party may be hedonistic, however it is only made possible by the longer term commitment to the craft.
Oh, and it doesn't really need to be hard work. A lot of musicians are in it purely for the joy of the craft. Personally, I get a lot of joy getting better at creating things, whether it is writing computer code or crafting furniture projects using my woodworking tools. And although it takes a time commitment, it is something that I just sit down and do for fun.