But you aren't awarding XP for any of those things. You're rewarding them for finding large cashes of gold, regardless of what they had to do to get to it. There are more than a few monsters in the monster manual that aren't supposed to carry gold. How do explain to your players that they don't get any experience for defeating a rust monster horde because they ate all the treasure?
Yes, rust monster hordes are worth (close to 0) XP.
This means rust monsters are a nuisance, something to be avoided, not something to be challenged. Fighting them, or encountering them, is a dead-weight loss.
In an XP-for-fighting system, if you where aware of a nest of rust monsters, going there and beating them up would be a way to gain power and gain levels. In an XP-for-treasure system, if you where aware of a nest of rust monsters, there would be no point in engaging them at all.
If you are in a dungeon and you see a nest of rust monsters, you might scout past them (say, with a familiar) and see if there was anything worth the bother behind them. If not, you'd leave them alone, or maybe you'd bait them into attacking the hobgoblins.
There would be zero reason to clear them out.
The things that the Characters are supposed to try to challenge or bypass? Those are things guarding treasure. The things that don't guard treasure? Things you want to minimize your interaction with; they are pure obstacles.
A wandering encounter with a griffon? All loss, no gain. So working out how
not to encounter that griffon is part of the PC's goals.
Tracking down the pirate's buried treasure? Lots of incentive.