The sages taught in the Mishnah (8a): One may not marry women during the Moed, neither virgins nor widows, nor may one perform yibbum, because it is a joy for him. But he may remarry his divorcee. And the Gemara explains four reasons: The first is because one may not mix one joy with another joy, and this is what it means by saying "because it is a joy for him." That is to say: that the marriage is a joy unto itself, and one may not mix it with the joy of the festival. For just as one does not perform mitzvot in bundles, as we require that his heart be free for one mitzvah, so too we require that his heart be free for one joy. And it is derived from the verse regarding Solomon (Kings I, 8) when he finished the building of the Beit HaMikdash, and he made seven days of joy, he did not make them during the festival of Sukkot. As it is written: "And Solomon held the feast... seven days and seven days." And in the Yerushalmi it is derived from Jacob and Rachel, as it is written: "Fulfill the week of this one and we will give you..." And even though the Yerushalmi itself in the chapter Ve-elu Megalchin (Halacha 5) seeks to derive seven days of mourning from Jacob, as it is written "And he observed a mourning period for his father of seven days," and it asks: Do we learn a matter from before the giving of the Torah? See there. And how does it learn here from before the giving of the Torah? — It appears to me that this is the explanation: Certainly we learn from before the giving of the Torah, and many homiletic interpretations we learn from the book of Genesis. Rather, there, of necessity we do not learn, for it was not according to the law of mourning, as it was still before the burial. But here, we certainly learn. (And see Tosafot 20a, starting with the word "Mah." And see Pnei Moshe who was pressed on this, and be precise and you will find it easy.)
שנו חכמים במשנה (ח א): אין נושאין נשים במועד, לא בתולות ולא אלמנות, ולא מייבמין, מפני ששמחה היא לו. אבל מחזיר את גרושתו. ומפרש בגמרא ארבעה טעמים: האחד מפני שאין מערבין שמחה בשמחה, וזהו שאומר "מפני ששמחה היא לו". כלומר: דהנשואין הוי שמחה בפפני עצמה, ואין מערבין אותה בשמחת הרגל. דכמו דאין עושין מצות חבילות חבילות, דבעינן שיהא לבו פנוי למצוה אחת, כמו כן בעינן שיהא לבו פנוי לשמחה אחת. ויליף לה מקרא דשלמה (מלכים ח) כשגמר בניין בית המקדש, ועשה שבעה ימים שמחה, לא עשאן בחג הסוכות. כדכתיב: "ויעש שלמה את החג שבעת ימים, ושבעת ימים…". ובירושלמי יליף לה מיעקב ורחל, דכתיב: "מלא שבוע זאת ונתנה לך…". ואף על גב דהירושלמי בעצמו בפרק ואלו מגלחין (הלכה ה) דבעי למילף אבלות שבעת ימים מיעקב, דכתיב "ויעש לאביו אבל שבעת ימים", ופריך: וכי למידין דבר מקודם מתן תורה? עיין שם. ואיך לומד כאן מקודם מתן תורה? – נראה לי דהכי פירושו: דודאי למידין מקודם מתן תורה, וכמה דרשות אנו למידין מן ספר בראשית. אלא דבשם בעל כרחך אין למידין, שהרי לא היה כדין אבלות, שעדיין היתה קודם הקבורה. אבל בכאן שפיר למידין. (ועיין תוספות כ א דיבור המתחיל "מה". ועיין פני משה שנדחק בזה, ודייק ותמצא קל.)