Parshas Chukas

“This is the chok of the Torah.” (Bamidbar 19:2) 

Rav Yosi Bar Chanina said: Hashem said to Moshe “To you I’m revealing the reason for parah [adumah] but for others it’s a chok.” (Midrash Rabbah 19:6) 

Yet the Torah does state in several places that the parah adumah was atoning for the egel. 

Furthermore if there is a reason for the mitzvah of parah adumah why did Hashem conceal it from man even from Shlomo Hamelech the wisest of all men?