The Rambam famously believed that sacrifices were given to ween people off idolatry.
Therefore, it can be assumed that when Mashiach comes, there won't be a need for sacrifices. Yet, the Rambam doesn't mention that in the Mishnah Torah.
There are many other places where "rationalistic" Taamei Torah (reasons behind Mitzvos) contradict Halacha.
How are these resolved?