The Petavatthu contains 51 poems, each explaining how unwholesome deeds led to the rebirth of a being into the miserable realm of the "hungry ghosts" (peta).
Some of your ancestors and deceased loved ones may have been reborn as hungry ghosts, no longer able to fend for themselves. In this poem the Buddha explains that it is to your long-term benefit — and to theirs — that you honor their memory with gifts.