In temples adhering to canonical protocol, the offering of food itself is made from the laypeople to the (living) Buddhist monks, thus generating "merit" that indirectly benefits the dead.
In temples adhering to traditional customs, the provision of food by laypeople to (living) Buddhist monks generates "merit," which has a positive effect on both the living and the deceased, illustrating the interconnectedness of these groups.