سُبْحَانَ ٱللَّٰهِ
Holy Qur'an
Al-Qur'an
Kids Qur'an
Cf. 6:23 and the corresponding note, as well as 2:11 .
Sc., "and He will judge you on the basis of your motivation" - implying that their plea of ignorance is rejected in view of the fact that they were offered God's guidance through His revealed messages, which they deliberately scorned in their false pride and dismissed out of hand as "fables of ancient times" (see verses {22-24} above).
That is, those who died in a state of Kufr, or rebellion against Allah, which was really wrong-doing against their own souls.
The excuse is a mere pretence. At first they were too dazed to reply. When they reply, they cannot deny the facts, but resort to the sinner's excuse of saying that they sinned through ignorance, and that their motives were not wrong. Such a plea raises a question of hidden thoughts which are difficult to appraise before a human tribunal. But here they are before their Divine Author, Who knows every secret of their souls, and before Whom no false plea can be of any value. So they are condemned.