When it says, “You shall be holy unto Me, for I, God, am holy” (Lev. 20:26), the Torah is talking about the glory of Israel:
You are holy, you are uplifted; therefore, you must not degrade yourselves and sink so low.
The requirement of holiness in Leviticus is thus a type of musar.
There are children on whom this type of musar works very well.
One need not hit his child or punish him, but merely say to him, “This kind of behavior is beneath you.”
Much of what is written in Leviticus about transgressions is based on this approach: “Is it possible that you would do such shameful things?”
Rabbi Adin Steinsaltz