If everything is written in destiny, then what is the benefit of action?
Understand that this does not mean that you will do what is written in destiny, but it means that what is written in destiny is what you will do by your own choice, because destiny is the name of divine knowledge and Allah Almighty knew in advance what you were going to do by your own choice, so Allah Almighty wrote all that in the Preserved Tablet, but your going to Paradise or Hell will actually be based on your voluntary deeds. It is not that a person will do what is written in destiny, but rather what a person will do by his own choice has been written in destiny. Allah Almighty has given man choice and man continues to act according to that choice. Now, to think that everything has been written in destiny, so sit idly by, is not correct. Therefore, when the Holy Prophet (peace and blessings of Allah be upon him) narrated this hadith, the Companions (may Allah be pleased with them) asked, "Fafima al-'amal ya Rasul Allah?"
When it has been decided that so-and-so is destined for Paradise and so-and-so is destined for Hell, then what is the benefit of acting? The Holy Prophet (peace and blessings of Allah be upon him)
said, "I'malu fakullu muyassarun lima khuliqa lahu"
That is, keep acting, because every person has to do the work for which he was created. Therefore, keep acting by using your choice.