How Could the Temples Have Been Destroyed?

 

An annual Jewish observance commemorates the destruction of the first and second temples. Why did God allow the first and second temples to be destroyed?