I have heard that on one occasion the Blessed One was staying near Savatthi in Jeta's Grove, Anathapindika's monastery. Then a certain devata, in the far extreme of the night, her extreme radiance lighting up the entirety of Jeta's Grove, went to the Blessed One and, on arrival, having bowed down to him, stood to one side. As she was standing there, she recited these verses in the Blessed One's presence:
When a house is on fire
the vessel salvaged
is the one that will be of use,
not the one left there to burn.
So when the world is on fire
with aging and death,
one should salvage one's wealth by giving:
what’s given is well salvaged.
What's given bears fruit as pleasure.
What isn't given does not:
thieves take it away, or kings;
it gets burnt by fire or lost.
Then in the end
one leaves the body
together with one's possessions.
Knowing this, the intelligent man
enjoys possessions and gives.
Having enjoyed and given
in line with his means,
un-censured he goes
to the heavenly state.