Some people ask: Why is it that the unbelievers are punished in hell forever while they were not disobedient to Allah forever? Similarly, why will the believers be rewarded with heaven forever while they were obedient to Allah for only a short time in this life? The answer is that the unbelievers had the intention to disobey Allah forever while the believers had the intention to obey Allah forever. Thereby, they are rewarded according to their intentions.
As al-Qaari pointed out, entrance into Paradise is due to faith, the levels of Paradise are due to the deeds performed and remaining therein forever is due to the intention that the person had to obey Allah as long as he could have lived. Similarly, entrance into Hell is due to disbelief, its levels are due to the evil deeds that the person performed and its eternity is due to the intention the unbeliever had to forever disobey Allah.
The disbelievers may do some deeds that seem to be good because they bring positive results for others, such as humanitarian acts. However, that does not mean that such acts are good for the person himself. Ibn Rajab stated,
Ordering good is a type of charity. Bringing about reconciliation and peace between two is a good deed, even if it is not done for the sake of Allah, due to the benefit that it brings for others. The people receive goodness and good. However, as for the one who brought it about, if he did that for the sake of Allah and seeking His pleasure, then it is good for him and he shall be rewarded. If that was not his intent, it is actually not good for him nor shall he be rewarded for it.
The problem with the deeds of all the disbelievers- in general- is that none of them, no matter how utilitarian or humanitarian they seem, are for the sake of Allah. They perform deeds for the sake of the false, claimed gods, such as Jesus. Or they perform deeds to make their own egos feel good. Sometimes- many times- they do acts to impress others. Hence, their deeds are never really for the sake of Allah and therefore, they are not deserving of reward from Allah in the Hereafter. They claim to be doing good while at the same time they are refusing to submit to Allah. Hence, there can truly be no good in them. They are as those described in the Qur’an,
“Say (O Muhammad): Shall We tell you the greatest losers in respect of (their) deeds? Those whose efforts have been wasted in this life while they thought they were acquiring good by their deeds? Those are they who deny the signs of their Lord and the meeting with Him [in the Hereafter]. So their works are in vain, and on the Day of Resurrection, We shall not give them any weight. That shall be their recompense – Hell, because they disbelieved and took My signs and My Messengers by way of jest and mockery.” (al-Kahf, 18/103-106)
However, Allah may reward them for their deeds in this world. Allah has stated, as was mentioned earlier,
“Whosever desires the life of this world and its glitter, to them We shall pay in full (the wages of) their deeds they did therein, and they will have no diminution therein. They are those for whom there is nothing in the Hereafter but Fire; and vain are the deeds they did therein. And of no effect is that which they used to do.” (Hood, 11/15-16)