سُبْحَانَ ٱللَّٰهِ
Holy Qur'an
Al-Qur'an
Kids Qur'an
Implying that so long as man is not fully aware of the existence of God, he cannot really discern between what is morally right or wrong; and since God is just, He does not punish anyone who has not yet attained to such a discernment (or, as expressed in the preceding sentence, "to [moral] purity"): cf. 6:131 - "thy Sustainer would never destroy a community for its wrongdoing so long as its people are still unaware [of the meaning of right and wrong]".
Even for such a one as Pharaoh, intoxicated with his own power and greatness, guidance and grace were offered through Moses.