Ibn Qayyim said: “…The same applies to the person’s state of mind. When he is in the state of mind that helps him to achieve the purpose for which he was created, then that state of mind is much nobler than any other. And the same applies to actions. Any action which helps him to get closer to the purpose for which he was created is better than any other. Hence prayer and jihaad are among the best of deeds because they bring one closer to that aim, and this is how it should be, because the closer a thing is to the goal the better it is than that which is far away from it. The action which prepares the heart and mind to know Allah and His names and attributes, and to love Him, fear Him and put one’s hopes in Him is better than that which is not like that. If a number of deeds have this quality in common, then the best of them is that which brings one closest to this goal. Hence acts of worship have this goal in common, so they are required for the sake of Allah and sins have in common the fact that they block the heart and prevent it from reaching this goal, so they are forbidden. The effect of acts of worship and sins depends on their degree. This is something to which attention must be paid, which is that a particular deed may be better for one person than another. For example, in the case of a rich man who has acquired much wealth and is reluctant to spend of it, his giving charity is better for him than spending the night in prayer (qiyaam al-layl) and observing naafil fasts by day. In the case of a brave man who can strike fear into the enemy’s heart with his whip, his spending an hour in the ranks and fighting against the enemies of Allah in jihaad is better than Hajj, fasting, giving charity or doing naafil acts of worship. In the case of a scholar who knows the Sunnah, halaal and haraam, and the ways of good and evil, his mixing with the people and teaching and advising them about their religion is better than his withdrawing and spending his time in prayer, reading Qur’an and tasbih."
[Uddat al-Saabirin, 93]