I've personally struggled over and over with the question of whether I'm making code or music or art for some kind of quickly-fading recognition or to prove something to myself, or just to have something to do. I see pros and cons both ways. And I wonder whether there even is such a thing as leaving a lasting mark in this world. And whether it's better to leave no mark at all, than to leave any kind of stain. An imprint in a clay tablet that lasts 5000 years certainly is a mark. But then you risk being reduced to an archaelogical specimen.
We can still unscramble some cuneiform, but we can't decipher the personal motives of the writers, and I wish we could. I'm concerned with what it means to be a good human and a successful one at the same time, but, I'm a drop in the ocean.
I think the point of these philosophies is not really to make you a morally upright person so much as to show you that you're a grain of sand, and let you draw your own conclusions.
OTOH the very fact that we (as a civilization) can still read cuneiform from 50 centuries ago, and still care to, contradicts somehow to your point that all we do is dust in the wind. We never know.