Some people ask questions such as:
1). “Why hasn’t God guided everyone to the path of paradise? And why does he give us sexual desires, and then punish us for committing adultery?
2). Why does He infuse in us the desire for money, and then takes us to task for holding on to it?”
We can take the sort of questions asked by school children as an analogy to the above. For example they might ask,
1). Why don’t teachers give us answers to our exam questions at the beginning of the year?
2). Why are exam questions kept secret?
3). Why are we asked to prepare for exams? and so on.
Needless to say the purpose of keeping the questions secret is to ensure that students study the whole syllabus, as prescribed. If the exam questions were made known to the students beforehand, the examinations themselves would become a pointless exercise.
This world is a testing ground in the same way. We are given certain tests and given different problems, where the faithful and the God-fearing stand apart from the unfaithful and the unbelievers, and the righteous stand apart from the corrupt. In other words, were it not for the hurdles in a race, you would not be able to distinguish a horse who runs fast from the one who is lazy.
If God had so willed He could have created the whole of mankind as one nation. He could also, if He had wished, have “made all mankind show absolute obedience to Him, like the angels. But, He willed differently, and nothing can change what He wills, and it is not for us to question what He does. God has absolute control over us: unto Him we belong and unto Him we shall return. There is no other God but Him. , He can, if He wills, cause us great hardship and unhappiness, and if He wishes He may pardon us. So we pray to Him to I grant us pardon and mercy, and we seek refuge in Him from His punishment. The truth is that we cannot save ourselves from this punishment unless He pardons us; and He alone grants that pardon.
Islam-A General Introduction: “Ta’rif-e-Aam bi-Din il-Islam” By: Shaikh Ali Al-Tantawi تعریف عام بدین الاسلام