A man asked: What is the good of doing anything, Messenger of Allah? The Messenger of Allah (ﷺ) said: When Allah creates a servant for Paradise, He employs him in doing the deeds of those who will go to Paradise, so that his final action before death is one of the deeds of those who go to Paradise, for which He will bring him into Paradise. But when He creates a servant for Hell, He employs him in doing the deeds of those who will go to Hell, so that his final action before death is one of the deeds of those who go to Hell, for which He will bring him into Hell.
In-book : Book 42, Hadith 108
English translation : Book 41, Hadith 4686