Cause Of Inflictions
Everything is not written. To test man with choice of good and evil, on which some will go to Paradise and some will go to Hell, free choice and will has been given. If Allah also writes this part then the purpose of test fails, therefore everything can’t be written. Effort is also done by man to see if he is honest with the choices he make (e.g whether someone will make effort in following the right path or gives up in the middle). https://www.youtube.com/watch?v=_edr_vGD7RM