All praise is due to Allah, and may peace and blessings be upon the Messenger of Allah. To proceed:
There is no contradiction between the two verses. The angels’ question was not one of objection or rejection of Allah’s judgment. Rather, it was a question seeking guidance, knowledge, and understanding of the wisdom behind His action. As for Allah’s statement, “He is not questioned about what He does,” it means that Allah is not questioned in the sense of being held accountable or having His actions and judgments objected to, because He is the Lord and Owner of all creation, and all His actions are based upon wisdom and justice.
When Allah, the Exalted, said:
“Indeed, I am placing a successor on the earth.”
The angels said:
“Will You place in it those who will spread corruption there and shed blood, while we glorify You with praise and sanctify You?”
[Al-Baqarah: 30]
This was not an objection to Allah’s will, nor was it an accusation against His wisdom.
Allah has described the angels as:
“They do not precede Him in speech, and they act only by His command.”
[Al-Anbiya’: 27]
Their purpose in asking was to understand the wisdom behind creating a race among whose members some would spread corruption and shed blood.
The scholars of tafsir mentioned several explanations for how the angels knew this.
It was said that they knew what had occurred from creatures who inhabited the earth before Adam. It was also said that Allah informed them that among the descendants of this successor would be those who spread corruption and shed blood, and then permitted them to ask.
According to all these views, the essential meaning is the same: they asked in order to learn what was hidden from them, not to object to their Lord.
For this reason, Ibn Kathir, may Allah have mercy on him, described their question as:
A question seeking information and discovering the wisdom.
That is: What is the wisdom in creating beings among whom some will commit such corruption when there are angels who do not disobey Allah and who glorify Him with praise?
This was not an expression of pride or jealousy toward Adam and his descendants.
Rather, it was part of their question about the wisdom involved, as though they were saying: If the purpose of creation is worship and obedience, then we glorify You with praise and sanctify You, so what is the wisdom in creating a race among whose members some will commit disobedience and corruption?
Allah answered them:
“Indeed, I know what you do not know.”
[Al-Baqarah: 30]
That is, Allah knows of the wisdom and benefits in creating mankind that the angels did not know.
The scholars explained that among the children of Adam would be prophets, messengers, the truthful, martyrs, righteous people, scholars, devoted worshippers, and many others among the people of obedience and faith.
The existence of corruption among some human beings does not mean that the creation of mankind is devoid of wisdom. Rather, there are immense benefits and numerous aspects of wisdom that created beings cannot fully comprehend.
Therefore, Allah’s answer was:
“Indeed, I know what you do not know.”
Allah, the Exalted, says:
“He is not questioned about what He does, but they will be questioned.”
[Al-Anbiya’: 23]
The meaning is that Allah is not held accountable for His actions, and no created being has the right to object to His judgment or question Him in the manner of someone who disapproves and believes that Allah must justify His actions.
Allah is the Creator, Owner, and Controller of all things. To Him belong judgment and command, and He decrees whatever He wills according to His knowledge and wisdom.
The servants, on the other hand, are the ones who will be questioned about their deeds because they are created beings commanded to obey Allah.
Yes, if the question is asked for the purpose of learning, understanding, and seeking guidance, rather than objecting.
A servant may ask his Lord by way of request, such as asking Him for forgiveness or provision, and he may also ask in order to gain knowledge and understanding.
What is prohibited is questioning Allah’s decrees and judgments in a manner of objection and condemnation, as though a person were placing himself as a judge over the actions of Allah, the Exalted.
Questions can therefore be divided into three categories:
The angels’ question belonged to the second category.
Allah’s statement, “He is not questioned about what He does,” does not mean that every question addressed to Allah is forbidden. Rather, it means that Allah cannot be questioned in the sense of objection or accountability regarding His actions.
As for the angels’ question:
“Will You place in it those who will spread corruption there and shed blood?”
it was a question seeking guidance, knowledge, and understanding of the wisdom, not an objection to Allah.
Therefore, Allah answered them:
“Indeed, I know what you do not know.”
And Allah knows best.