You are correct.
The first one :
Pourquoi cours-tu... ?
is a direct question expecting a personal reason.
The second is a general question that can translate into
Why would anyone chase that treasure?
showing disapproval. It can either be a rhetorical question, introduce one's personal view of the matter, or genuinely ask for a reason to change one's mind. For instance, the person who asks might think that there's no need to run when walking would do just fine. Or that they found enough treasures already.
The second can also be used as a fatalistic statement, akin to
Why chase that treasure?
as in your own example.
The second, however, can also be used without critical tone, for example as the title of a list that enumerates reasons to do so.