The Jewish people had sinned, and their future stood in the balance. G-d's initial plans to destroy the people were thwarted by the intense prayers of Moshe, and it was on Yom Kippur that our covenant with G-d was reestablished. And on the very next day, the construction of the Mishkan began.
Although it is mashechet Gittin (55b-57b) that records the stories relating to the destruction of the Temple, the famous Talmudic passage stating that the first Temple was destroyed because of the three cardinal sins of idolatry, adultery, and murder, and the second because of sinnat chinam is actually found in mashechet Yoma (9b).
"G-d wanted to give merit to the Jewish people; therefore, He increased for them Torah and mitzvoth". A Jewish way of life offers so many opportunities for mitzvoth. We accumulate mitzvoth--and hence, merit--for such things as saying good morning to a passerby, conducting a business transaction honestly, showing up in shul to hear shofar, eating a meal on Shabbat, and many other activities that are both easy and enjoyable.