To build on the answer from @Southpaw Hare.
The old answer for non-sapient monsters is to have a corpse in their lair which has some treasure on/around it. Either a previous adventurer, or a trader are common. Also, as @GMJoe points out, Ghouls specifically eat dead, old flesh, they're likely to drag corpses from where they kill them, or from graveyards back to their lair. The pathfinder wiki on ghouls says they "often bury their victims for a while to improve their taste" before eating them.
For Undead you can have them still wearing something valuable from when they were alive, or have something about them which has their name and address (a letter from a lover, family, or guild perhaps?) and have those people give a reward for their departed's proper burial, or perhaps there's a bounty for the corpse because they were an outlaw. All of these can also be applied to corpses found in a Ghoul's lair.
You can also just add it somewhere else close in the area for an unrelated reason, such as having the underground equivalent of a bower bird have a nest with some jewels the PCs can take, or something else valuable which the other denizens in the area wouldn't take or destroy for some reason, perhaps the PCs have skills help them recognize it where the locals wouldn't.
Alternately, as @Southpaw Hare said, you could just not worry about it and add the treasure to a later encounter where it makes more sense, but I'd suggest being careful about keeping records of that kind of thing.