Oh that there were one among you who would shut the doors, that you might not kindle fire on my altar in vain! I have no pleasure in you, says YHWH Tsevaot, and I will not accept an offering from your hand.
Malachi 1:10

From God's perspective, it was better for the Temple and the Altar to be destroyed than to allow them to continue being used by a corrupt priesthood to offer corrupt sacrifices.