The fact that one is ignorant of the law does not a sufficient defence in a court of law make. Ignorance is no protection against punishment. The adult is presumed to know all the laws. This presumption is knowingly and clearly false. So why is it made in the first place?
There are many types of laws. If a person is not aware of the existence of gravitation, he will still obey it and fall to the ground from a tall building. This is a law of nature and, indeed, ignorance serves as no protection and cannot shield one from its effects and applicability. But human laws cannot be assumed to have he same power. They are culture-dependent, history-dependent, related to needs and priorities of the community of humans to which they apply. A law that is dependent and derivative is also contingent. No one can be reasonably expected to have intimate (or even passing) acquaintance with all things contingent. A special learning process, directed at the contingency must be effectuated to secure such knowledge.
Perhaps human laws reflect some in-built natural truth, discernible by all conscious, intelligent observers? Some of them give out such an impression. “Thou shalt...