All the older editions of D&D, but OD&D in particular, did a very poor job of explaining this, but it seems indisputably correct. You might go so far as to say that XP for treasure is the underlying but unstated assumption on which D&D is founded.
AD&D 2nd edition did not have this mechanism. Reading through the DMG, indeed, it is rather striking that the only time XP is supposed to be awarded for treasure is as an individual class award for Rogues. XP, in general, is recommended to be given for the following reasons:
- Fun. XP is for rewarding player involvement and making the game enjoyable for others (including, implicitly, the DM). It is correspondingly to be withheld if the players are disruptive or inactive.
- Survival. Simply by the PC surviving from session to session, he or she should gain XP.
- Improvement. As players learn how to play the game better (the text states "players should also improve by trying to play more intelligently each session") their characters should be awarded XP. I'm reminded once again of Zeb Cook's exhortation to always try to improve as a player and DM.
- In general, XP is awarded when a player has a clever idea, role plays well, or encourages others to participate
- Warriors gain XP for individually defeating monsters
- Wizards gain XP for using spells intelligently, researching spells, making magic items, and so on
- Priests gain XP for using granted powers and "furthering [their] ethos"
- Rogues gain XP for using their special abilities (i.e. thief skills and bard abilities) and getting treasure