Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
What is widespread among some people in preparing food for the family of the dead person at his/her annual anniversary, or weekly anniversary, or after 40 days of his/her death, etc.., and the gathering of the people at his/her house to recite the Qur'an is an innovation, and is contradictory to the guidance of our righteous predecessors.
The Prophet (Sallallahu Alaihi wa Sallam) ordered the preparation of food for the family of Ja’far when they heard that he died as a martyr and said: "Prepare food for the family of Jafar, what has befallen them has left them busy." [Reported by Ahmad, Abu Dawud, Tirmizi, Ibn Majah and Al Hakim] Al Albani and Arnout said 'this is sound Hadith'.
Jarir Abdallah Al Jabali said: "We consider the gathering of the people at the house of the dead person and the preparation of food for them after the burial, as being a lamentation (which is forbidden)." [Reported by Ahmad, and Arnout said that 'It is an authentic Hadith']
Therefore, Muslims have to stay away from innovations (newly invented matters in religion) as the Prophet (Sallallahu Alaihi wa Sallam) said: "Whoever introduces into this faith of ones that which is not from it, it is to be rejected." [Reported by Bukhari and Muslim]
The Prophet (Sallallahu Alaihi wa Sallam) also said: "The best of speeches are the words of Allah, the best guidance is the guidance of the Prophet (Sallallahu Alaihi wa Sallam), and the worst of the matters are innovations (in religion), and every thing newly introduced (in this religion) is an innovation, and every innovation is a misguidance, and every misguidance is in Hellfire." [Reported by Nisa’e and Al Albani said that 'It is an authentic Hadith.]
As regards the ruling about eating the food prepared following the death of someone, it is permissible. However, if someone abstains from eating it, as a sign of complaint and condemnation of the Bida’ (innovation), this may affect people in a good way preventing them from committing this innovation. Therefore it is without doubt more appropriate to abstain from eating such a food.
A Muslim has to be careful about sitting and socializing with the innovators, and contacting them if the purpose is not to call them to do good and forbid them from committing innovations and disobediences.
Giving Sadaqa (alms) on behalf of the dead person is acceptable and it is confirmed that the dead person receives the reward.
Ali Humaidi reported in his Musnad with an authentic chain of narration that a man told the Prophet (Sallallahu Alaihi wa Sallam) 'My mother died, and I think that if she was able to speak, she would wish to give Sadaqa. Will she get the reward if I give Sadaqa on her behalf. The Prophet (Sallallahu Alaihi wa Sallam) replied: “Yes”.'
The preponderant opinion of the people of knowledge (scholars) is that it is also possible to offer the reward of reciting the Qur'an for the dead person. So the family of the dead person can give Sadaqa for the dead, and can recite the Qur'an and give its reward as a present for the dead. They also have to stay away from innovations in this matter.
Allah knows best.