Why aren't good deeds rewarded for heaven while in state of mortal sin? What are the reasons?
When a person is in a state of mortal sin the life of God is dead in them. Even though they may remain Catholic in belief and there remain graces present to encourage the person to return to good graces, the sin is so serious that the life of God has been killed. If a murderer does you a kindness, is that supposed to make the murder(s) OK? No, one must first deal with the sin and then the kindness can mean something. Let the murderer turn himself in and "pay his debt" to society by humbly accepting whatever sentence is imposed, going through it, and then afterwards if the person works a kindness, only then can the kindness truly be worth something.
But as indicated, though the kindness done while still in a state of mortal sin cannot be counted towards one's heavenly diadems, it can be part of or a beginning of the grace of repentance, such that the person in a state of mortal sin who does a kindness might be one day brought out of a condition of mortal sin, so the kindness or other good deed is not wasted, plus it can always work the Providence of God, as the life saved by one while in a state of mortal sin could still go on to great sanctity and accomplishment, And God so desires that such good deeds be rewarded that the grace of repentance is often given in such cases.