For anything that you spend, Allāh ﷻ gives you a return from His unseen treasures – at times, within this world and at times, in the Hereafter and at times, in both.
We see that water comes down from above, animals and humans use it freely, needs of farms and forests are satiated, and no sooner does that supply of water finish, then another supply descends to replenish it. Similar is the case of wells dug for water that, no matter how much water is spent out of these, it stands replenished by nature from other sources of water beneath the bed.
Man eats up his food leaving the impression that he has finished it, but Allāh provides him with other food in its absence. In short, whatever man spends out in this world, it is the practice of Allāh that Allāh would replace it with something else similar to it.
According to a Ḥadīth of Ḥaḍrat Abū Hurairah رضي الله عنه in Ṣaḥīḥ Muslim, the Prophet ﷺ said, “Everyday when people rise to see another morning, two angels descend from the heavens and pray: O Allāh, bless the one who spends [out of what You gave] with its return, and let the one who withholds [what You gave] find it wasted.”
There is no promise of a return for spending that which is not spent in accordance with the Sharīʿah.
Ḥaḍrat Jābir رضي الله عنه reported the Prophet ﷺ said, “Good deed is sadaqah. When someone spends on himself or his children and family, that spending too falls under sadaqah. It brings reward. One who spends to protect his integrity and honour, this too is sadaqah. Whoever spends whatever he does in obedience to the command of Allāh, Allah has taken it upon Himself that He will give him its return except that which is spent in (wasteful, extra to need) building or sinful activity, for there is no promise of a return for it.”
After hearing this from Ḥaḍrat Jābir رضي الله عنه, his disciple, Ibn al-Munkadir asked, “What is the meaning of spending to protect one’s honour?” He said, ‘There may be a person about whom one apprehends that, should he not give him something, he would go about insulting him in all sorts of ways. Hence, giving to such a person is in order to save one’s honour.” [Dāraquṭnī]
[Maʿāriful Qur’ān, Volume 7]