Rambam, Moreh Nevuchim (Guide for the Perplexed) 3:32The Torah’s sacrifices replaced the idolatrous practices of the ancients in which Jewish people had been steeped
But the well-known custom which was common then, and the general mode of worship in which the Israelites were brought up consisted of sacrificing animals…It was in accordance with the wisdom and plan of God…that God did not command us to give up and to discontinue all these manners of service. For to obey such a commandment would have been contrary to the nature of man, who generally cleaves to what he is accustomed to; in those days it would have made the same impression as a prophet would make at present [the 12th Century] if he called us to the service of God and told us in His name, that we should not pray to God nor fast, nor seek His help in time of .trouble; that we should serve Him in thought, and not by any action. by Danny Gold
Rashi on Leviticus 10:2:1:
Rabbi Eliezer said, the sons of Aaron died because they rendered a halachic decision in the presence of Moshe their teacher. Rabbi Yishmael said they entered the Temple while intoxicated, and the proof is that after their death the Torah warns against performing the service in the Temple while drunk.