Hunting for treasure is not in and of itself anti-heroic.
XP for treasure is a simple way to include "story" awards in D&D. Too much treasure kicking around the campaign can be a problem for certain styles of game.
Alignment can be problematic, but the simpler version of Classic D&D works for me.
Taking all of the above together, let's combine my ideas on alignment with the Dave Arneson houserule that you only gain XP for 'frittering away treasure on hookers and blow.'
- Lawful characters, being concerned with advancing Civilization, only gain XP for donating their treasure to some agent of Order and Civilization. This could be their liege lord, the Thieves' Guild, a temple or church, the Tower of Magery, a museum, local charities, and the like.
- Neutral characters, being concerned with their own interests first, only gain XP for wasting their treasure on some hobby, or their own pleasure (the standard Arneson rule, in other words).
- Chaotic characters, being concerned with halting and reversing Civilization, only gain XP for destroying or hiding treasure in some way. And it has to be gone in a way that it's not likely to come back soon. Sinking a treasure ship before raiding the hold, dumping coins down bottomless pits, crushing gems to powder, melting down jewelry, using alchemy to turn gold into lead, or feeding it to a powerful dragon all count. Simply burying it in the woods pirate style to dig up later doesn't.