Aside from the wars that brought about the physical destruction of the house of God in each of these cases, the Gemara quotes a well-known tosefta that explains the underlying reasons for their destruction. According to the tosefta, the First Temple was destroyed because of the three cardinal sins of idol worship, forbidden sexual relations, and bloodshed that existed during that period. The Second Temple, however, was destroyed during a period when the people were involved in Torah study and fulfillment of the commandments. In that case, the tosefta explains, the underlying cause for its destruction was the sin’at hinam – wanton hatred – that existed between the people. The tosefta concludes that we can derive from this that sin’at hinam is considered to be as severe as the three cardinal sins of idol worship, forbidden sexual relations, and bloodshed.
With regard to the Mishkan in Shiloh, R Yohanan ben Torta explains that there were two problems – gilui arayot and bizyon kodashim – forbidden sexual relations and degradation of consecrated items. In this case the problems were not general societal ones, rather they were focused on the behavior of Hofni and Pinhas, the sons of Eli the High Priest at that time (see I Shmuel 12-26). These kohanim clearly did not see the korbanot as being a lofty religious ideal, rather they saw them as an opportunity to eat the meat of the sacrifices, as indicated in I Shmuel 15-16. With regard to sexual impropriety, a simple reading of I Shmuel 22 seems to indicate that they “lay with the women” who came to bring sacrifices. Nevertheless Rabbi Shmuel bar Nahmani quotes Rabbi Yohanan as rejecting the simple reading, arguing that their sin was in holding off the sacrifices of women who had given birth until the next day, forcing them to stay overnight in Shiloh.
Although halakha permits a women to live with her husband following childbirth even if she has not yet brought her sacrifice, Rabbenu Elyakim explains that being forced to stay over in Shiloh away from her husband was considered the moral equivalent of sexual impropriety. According to the Me’iri during Temple times the tradition was that wives did not sleep with their husbands until after the sacrifice was brought. Thus, sacrificing the korban the next day kept these women from returning to their husbands. The Ria”f explains that being forced to stay overnight in Shiloh is the intent of the passage that describes Hofni and Pinhas as sleeping with the women, that is to say, in Shiloh, together with them.