The essential public character of a law requires that the law, once properly promulgated, must apply to anyone in the jurisdiction where the law applies.
The theme was widely discussed, also for political reasons, at the time of the Enlightenment and in the 18th century, given the heavy proportion of illiterate citizens in European countries (who would have some difficulties being aware of all the laws in a country).