“He may not come to the curtain nor draw near to the altar!” (Vayikra 21:23)
It is a negative commandment that a blemished person may not enter any part of the building of the temple, nor to the altar or between the altar and the temple, as it says “He may not come to the curtain nor draw near to the altar!”.
Amongst the roots of the commandment are that we must magnify and increase the honor of the House and its glory. Since it is the place of perfection, it is fitting that no blemished person be allowed to enter, as he is not perfect. The point of increasing the glory of the Temple has already been explained.