In many Buddhist countries, it is part of the culture to regularly offer alms to the Sangha in the name of deceased relatives in order to dedicate the merit to them. Here, I want to look at the rationale behind that practice.
In the Sigalovada Sutta, the Buddha declares five duties of a child towards his parents as follows:
"In five ways, young householder, a child should minister to his parents as the East:
(i) Having supported me I shall support them,
(ii) I shall do their duties,
(iii) I shall keep the family tradition,
(iv) I shall make myself worthy of my inheritance,
(v) furthermore I shall offer alms in honour of my departed relatives.
In the Filial Piety Sutra, the Buddha also advices that "For the sake of your parents, make offerings to the Triple Jewel".
So how are offerings to the Sangha done in honour of the deceased beneficial? There are three benefits, one that accrues to the dead, one that accrues to the giver himself/herself, and one that accrues to the receiver of the gifts (the Sangha).
In what manner are the dead able to gain benefit from the almsgiving? The Suttas clearly say that it is through the act of rejoicing in the meritous act done by the giver that the dead are able to gain merit themselves and enjoy happiness when such merit bear fruit. Thus it is by way of the wholesome mental quality which is produced in the mind of the dead by the act of rejoicing that they are able to gain merit themselves.
This means that there is no actual "transfer" of merit as some people tend to misunderstand. Dedicating merit to the dead therefore merely provides an opportunity for the dead to gain merit through their own action by performing the wholesome deed of rejoicing in other people's meritious deeds. This is particularly very important when we consider the possibility that they may have been reborn into a lower realm where there is much suffering and no chance to perform meritious acts such as almsgiving themselves. In fact it is said that in some hungry ghost realms, the the only source of happiness for those beings are by rejoicing in the merits that are dedicated to them.
In the Kaladana Sutta, the Buddha said:
In the proper season they give —
those with discernment,
responsive, free from stinginess.
Having been given in proper season,
with hearts inspired by the Noble Ones — straightened,
Such — their offering bears an abundance.
Those who rejoice in that gift or give assistance,
they, too, have a share of the merit,
and the offering isn't depleted by that.
So, with an unhesitant mind, one should give
where the gift bears great fruit.
Merit is what establishes
living beings in the next life.
In the Tirokudda Sutta, the fact that the dead are able to gain merit through rejoicing in the act of giving is clearly stated. In this Sutta the Buddha also says that offerings made to dead relatives should be done as an act of compassion.
Thus those who feel sympathy for their dead relatives
give timely donations of proper food & drink [to the Sangha]
— exquisite, clean —
[thinking:] "May this be for our relatives.
May our relatives be happy!"
And those who have gathered there,
the assembled shades of the [dead] relatives,
with appreciation [they rejoice and] give their blessing
for the plentiful food & drink [offered to the Sangha]:
"May our relatives live long
because of whom we have gained [this gift].
We have been honored,
and the donors are not without reward!
Furthermore, offerings made in the name of the dead are to be regarded as an act of gratitude and for repaying the kindness that we once received from them when they were alive. In respect of dead relatives, one also discharges one's duty towards them by making such offerings. Again, from the Tirokudda Sutta:
"He gave to me, she acted on my behalf,
they were my relatives, companions, friends":
Offerings should be given for the dead
when one reflects thus on things done in the past.
For no weeping, no sorrowing
no other lamentation benefits the dead
whose relatives persist in that way.
But when this offering is given,
well-placed in the Sangha,
it works for their long-term benefit
and they profit immediately.
In this way the proper duty to relatives has been shown,
great honor has been done to the dead,
and monks have been given strength:
The merit you've acquired isn't small.
I think it's worth pointing out that while the act of dedicating merit is often associated with almsgiving, it is also often done after meditation sessions. In addition, the act of rejoicing in other people's meritious deeds is not something that only the dead can do, but it is also an important practice for the living. In the Theravada tradition, rejoicing in other people's merits is regarded as one of the ten wholesome ways of making merit as stated in the canonical Abhidhamma Pitaka and its commentaries. Such act also constitutes a way of developing sympathetic joy (mudita) which - along with compassion, metta and equanimity - is one of the four sublime states. In the Mahayana tradition, rejoicing in other people's meritious deeds is part of the fifth vow of the ten great vows of Bodhisattva Samantabhadra as proclaimed in the Avatamsaka Sutra,
In conclusion, for those who don't do so already, I would hope that you consider the act of dedicating your merits to the dead. This practice can be regarded as developing compassion as well as to show our gratitude to those who were kind to us when they were alive. But in the context of developing compassion, we can dedicate our merit not just to our relatives or those who we knew, but to all beings whether they are devas or hungry ghosts or whatever, so that they may gain benefit from our meritious deeds and thereby enjoy happiness through the act of rejoicing. Furthermore, whenever we see or learn about meritious/wholesome/skillful acts done by someone else, we should rejoice in those actions as a way to develop mudita (sympathetic joy).