“Indeed a servant commits a sin by which he enters Paradise; and another does a good deed by which he enters the Fire.” It was asked: How is that? So he replied: “The one who committed the sin, constantly thinks about it; which causes him to fear it, regret it, weep over it and feel ashamed in front of his Lord – the Most High – due to it. He stands before Allah, broken-hearted and with his head lowered in humility. So this sin is more beneficial to him than doing many acts of obedience, since it caused him to have humility and humbleness – which leads to the servant’s happiness and success – to the extent that this sin becomes the cause for him entering Paradise.
As for the doer of good, then he does not consider this good a favour from his Lord Upon him. Rather, he becomes arrogant and amazed with himself, saying: I have achieved such and such, and such and such . So this further increases him in self adulation, pride and arrogance – such that this becomes the cause for his destruction.”
[Ibn al-Qayyim (rahimahullah) -Al-Waabilus-Sayyib minal-Kalimit-Tayyib p.15]