Allah Subhanahu Tala Created each and every being,according to the Holy Quaran...Lets asssume there is a creation who will end up in hell... Allah knew this even before creating it..Still Allah goes on to create it...Why??I mean some will say that Allah has given us willpower with which we can change our destiny....I agree ,,But Allah also knew that he/she is going to misuse his /her willpower and will eventually get deviated..So Why is he/she created??
according to Quran ALLAH created us only for HIS pray and to test us on the behalf of us that what we do ,which path we choose ,can we stand with the messenger(Hazrat Mohammad (s.a.w)) of ALLAH or opponent.
Blessed is He in whose hand is dominion, and He is over all things competent -
[He] who created death and life to test you [as to] which of you is best in deed - and He is the Exalted in Might, the Forgiving -
the logic is quit complicated behind it, let's assume someone who is non believer god knows his destiny for sure either heaven or hell but there are things in life that can interfere with his destiny like for examples that heart that knows arrogance when it come to analyzing the truth he only recognize what he knows and he trash everything else so this guy is blind for sure so he is not going to get guidance, his destiny is known, why because even he can see the truth he will not accept it because of his pride, so there are two people one with a open heart and the other with close heart and here is in the QURAN SURAH AL HAJJ 46
"So have they not traveled through the earth and have hearts by which to reason and ears by which to hear? For indeed, it is not eyes that are blinded, but blinded are the hearts which are within the breasts."
"Now, who can be more unjust than the person before whom his Lord's Revelations are recited to admonish him, and he turns away from them and forgets the evil end to which he has paved the way with his own hands? As regards those people, who have adopted such an attitude, We have put coverings over their hearts which do not let them listen to the Qur'an, and We have produced heaviness in their ears. While in this state, they will never be guided aright howsoever you may invite them to the Guidance."
why he created us there is no answer surah Al Anbiya 23
"He is not questioned about what He does, but they will be questioned."
SURAH AL BAQARAH 30
"when your Lord said to the angels, “Indeed, I will make upon the earth a successive authority.” They said, “Will You place upon it one who causes corruption therein and sheds blood, while we declare Your praise and sanctify You?” Allah said, “Indeed, I know that which you do not know."
ALLAH From his generosity he did not want to be alone. We have been given the presence of us who have never existed, and granted us existence, He created us to prepare us for everlasting life. From the goodness of ALLAH that He gave you the grace of existence. He gave you the opportunity to exist, to enjoy life here on earth, to have a chance to live in eternal bliss, if you want, and to do what makes you worthy of bliss, Allah gave us choices either willingly or unwillingly to worship him.
"I created the jinn and humans for nothing else but that they may serve Me"