The law of the red heifer is said to be a chukah, an ordinance that transcends human reason. But the Be’er Mayim Chaim and other works point out that R. Moshe Hadarshan explains that the purpose of the red heifer was to make it possible for the Jews to gain attainment following the sin of the golden calf. Why, then, is this law referred to as a chukah?
The author of Yismach Yisrael (Terumah) quotes his father, the holy Admor, who in turn cites our holy rebbe of Worke, with an answer to this question.
The essence of the sin of the golden calf was lack of faith. Faith operates when the intellect is not illuminated and the mind is not clear. (As the verse states, “Your faithfulness is in the nights.”) When the people of that generation were deprived of the presence of Moses for a short while and their intellect did not shine for them sufficiently, they lacked faith and made the golden calf.
The rectification for that is an equivalent measure of repentance—i.e., a strengthening of faith, of believing simply (even if we do not know and understand with our intellect) in the commandments of God.
And that is the meaning of the words of R. Moshe Hadarshan: although the law of the red heifer is a chukah without reason and we cannot understand it with our intellect, nevertheless we keep it. Therefore it is a rectification for the sin of the golden calf, the lack of faith—i.e., this red heifer comes, which lacks human reason and in which everything is from the aspect of faith, and grants atonement for the sin of the golden calf, which was a lack of faith.