All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
If a Muslim intends to do good and seeks the reward from Allaah with the habitual actions ('aadaat) that are beneficial to others – such as his lawful profession and the like – then he will be rewarded for it without any doubt.
‘Uqbah ibn ‘Aamir narrated that he heard the Prophet say, “Allaah, The Most High, will cause three persons to enter Paradise for one single arrow: the maker of this arrow when he has a good intention in making it, the one who shoots it, and the one who hands it over to the one who shoots it.” [Al-Arna'oot classified it as a hasan (good) hadeeth] Please, refer to fatwa 267211.
If a Muslim did not intend a reward in the Hereafter for his good deed, will he be rewarded for it or not? Some scholars are of the view that a Muslim will be rewarded for all his actions in which there is a benefit to others even if he did not intend the reward.
Jaami’ Al-‘Uloom wal-Hikam authored by Ibn Rajab reads, “Al-Bukhari and Muslim reported from ‘Anas that the Prophet said, 'There is no Muslim who plants a plant or a tree or sows a seed and then a human being or a bird or an animal eats from it except that it is considered as an act of charity for him.
Also, in the Musnad, with a weak chain of narration, it was related from Mu’aath ibn Anas Al-Juhani that the Prophet said, “Whoever builds a building without any injustice or plants a plant without injustice, it is considered a continuous charity for him as long as any creation of Allaah, the Most Merciful, benefits from it.”
The apparent meaning of all these ahaadeeth is evidence that all these things will be a charity for which the planter and the like will be rewarded even if he did so without intention. Also, the saying of the Prophet “Do you not know that if he had committed forbidden sexual intercourse, he would have been sinful? Similarly, if he does it in a lawful way (i.e. with his wife), he will be rewarded for it."; the apparent meaning of this hadeeth is that he is rewarded for having sexual intercourse with his wife even if he did not have the intention to get a reward; this is the view of some scholars.
Abu Sulaymaan Ad-Daaraani said, “If a person does a good deed without intention, then his intention of choosing Islam is sufficient for him instead of choosing other religions, and the apparent meaning of this is that he will be rewarded for it even if he did not have intention at all, because by him embracing Islam, he chooses to do good deeds in general, so he will be rewarded for them with that intention.” [End of quote]
On the other hand, Ibn ‘Uthaymeen said, “If a person does what is permissible without having the intention that it is an act of worship, then he does not get a reward unless there is a benefit for others with that act, such as a person feeding his family, whom he is obliged to spend on, and he feeds them, so here he may not have the intention, but he will have a reward; also, if he plants a seed or a date tree, and a bird or an animal or a human being eats from it, then a reward will be written for him.” [Excerpted from the Open Door Meeting]
Therefore, if an employee seeks a reward from his lawful ordinary job from which other people benefit, such as his work in his company, or his work in the construction of mosques, then he will be rewarded for it. But if he does not seek a reward for it, then it is hoped that he will also be rewarded for it according to the view of some scholars.
Allaah knows best.