Can we ever know the answer to that question? Even today we cannot evaluate the true nature of an artist's motivation--and even when they claim to tell us from their own lips! No, we'll never know the motivation of those scratchers upon rocks, no matter what we may imagine.
We do know, however, that some of the greatest works of art were created out of a direct desire for "money" or "fame." That tells us something... And, yes, many artists have said they work for the eternal image to be passed down through generations, and the idea exists that "art" itself doesn't exist unless it is "justified" by time. But so much is in doubt.
Where is the line, for example, between "art" and the "sarcred"? For indigenous people much of what we consider their "art" is for them their "sacred" work and not art, and their "art" is what we consider mere "craft." And their craft will not last, it is made to be disposable in many instances, made from materials that simply melt away over time: clay, straw, etc. So, what of that?
In general, as always, I agree with you, and never more so than on this particular topic; but there are matters here so broad that they cannot be contained.