Agnostic Or Muslim
If it is a truth seeking journey, an honest quest, not an excuse to deny the message of God, is rather appreciated. If You die before you reach a conclusion it is still a worthy effort and will be rewarded by God, IA. First, you have to see why do you believe that Qur’an is the word of God. If You come to believe that it is the word of God then you start to understand certain problems in Qur’an you do not comprehend. Now, the answer to your question is that God wanted to grant His blessings to human beings and Jinns. But he wanted them to earn His blessings on merit. They should use their intellect in face of their baises, prejudice, and unjustified wishes, they should disciple themselves. Those who would fail with an excuse they would be forgiven, but those who would rebel they will be punished for their rebellion. This is what we do with the criminals with no excuse. God knew in advance that some people would rebel, but It was His will to do it. So He did. Now our escape it is to follow His instructions to pass the test and earn the eternal rewards. You can ask this question to God in the hereafter if He would allow.