Leviticus 21:9
And the daughter of any priest, if she profane herself by playing the whore, she profaneth her father: she shall be burnt with fire. And the daughter of any priest, if she profane herself by playing the whore, she profaneth her father: she shall be burnt with fire.
The requirement stands within a larger body of instruction in Leviticus 21:6–23 governing those who served in Israel's sanctuary. That service demanded holiness, purity, and freedom from blemish in those who performed it. The reason given is the closeness of their work to God, which set a higher standard for their character and conduct. The strictness of the rule reflects the sacredness of the office rather than mere outward ceremony.
God has not changed in holiness nor lessened His particularity in what He requires. Ministers of Jesus therefore are to be marked by deep piety. Their lives are to reflect the holiness of the God they serve, just as surely as did the lives of those who ministered in the ancient sanctuary.