Yet Allah, in His perfect mercy and beneficence, does not punish anyone until He has sent them a messenger, even if they commit deeds for which they deserve blame and punishment. Thus, the Arab polytheists and others to whom a messenger was sent committed evil and reprehensible deeds that warranted blame and punishment. Nevertheless, the Lord, Most High, would not punish them until He had sent them a messenger.
People hold three views on this matter. Each is held by a group among those who identify with the Sunnah, from the followers of the four imams, including the followers of Ahmad and others.
One group says:
Actions possess no qualities whatsoever that make them good or bad. Calling an action good or bad means only whether or not it is prohibited. This is a relational attribute established only by revealed law. This is the view of al-Ashʿarī and those who followed him among the followers of Mālik, al-Shāfiʿī, and Ahmad, such as Judge Abū Yaʿlā and his followers. These scholars do not admit the possibility that Allah would punish someone who has never sinned at all; they therefore admit the possibility of His punishing children and the insane.
Another group says:
Rather, actions possess good and bad qualities, which may be known through reason. Liability to punishment is established through reason, even in the absence of revelation. This is the position of the Muʿtazila and those who agree with them among the followers of Abū Hanīfa and others, such as Abū al-Khattābī and others.