Allah (swt) tells us in the Qur’an that the reward of spending in charity is like:
“A grain of corn which grows seven ears, and each ear has a hundred grains”
Therefore, Sadaqah Jariyah donations are often made in the name of a deceased person so it may continue to benefit them in the Hereafter.
When a man passes away, his worldly acts come to an end, but three acts;
recurring charity, knowledge (by which others) benefit or a pious son who prays for him will bear continuous reward (for the deceased).”
– Sahih Muslim