Mankind is one of the best of creation. Out of all the creation we have been given free-will to obey the will of Allah or to disobey the will of Allah. The angels do not have this kind of free-will, they worship and obey Allah all the time faultlessly. We have the potential to be of higher status than the angels as we can choose to obey Allah with our free-will. We have established previously that all creation is dependent on Allah and should submit to his will and worship him. Mankind has been blessed with free-will to submit or to not submit to this will.
It is inevitable that as a result of free-will some of us will choose to submit and others won’t. That is why this world exists as it is a test to distinguish between those who will submit to the will of Allah and those who won’t. First comes this distinguishing before heaven obviously. Allah knows the outcome but he would be unjust if he just placed us in heaven or hell. We could argue “What did we do to be put here in hell?” but Allah is not unjust.
Allah mentions in the Qur’an.
Do the people think that they will be left to say, “We believe” and they will not be tried? But We have certainly tried those before them, and Allah will surely make evident those who are truthful, and He will surely make evident the liars. Or do those who do evil deeds think they can outrun [i.e., escape] Us? Evil is what they judge. Quran 29:2-4
We are to be tried and these trials will truly test our faith in Allah as to whether we genuinely submit to Him and Him alone.
See further:
Why didn’t Allah create me mistakeless? (without free will to sin)
How is Allah fair as I didn’t ask for this?
Tests from Allah + some guidance to overcoming it