Yoma, Chapter One, Mishnah One
Tractate Yoma begins with preparations made seven days before Yom Kippur falls. This whole chapter deals with the week before Yom Kippur and how the sages instruct the High Priest so that he will be able to correctly perform the Yom Kippur service.
1) Seven days before Yom HaKippurim they remove the high priest from his house to the chamber of the counselors and they set up another priest to take his place lest something should occur to him to disqualify him [from being able to worship].
2) Rabbi Judah said: they even prepare another wife for him in case his wife should die, as it says And he shall make atonement for himself and for his house (Leviticus 16:6): his house this refers to his wife.
a) They said to him: if so there would be no end to the matter.
Section one: Seven days before Yom Kippur they isolate the High Priest so that he doesnt become impure. Part of the purpose of this separation was to keep him away from his wife, lest his wife become a menstruant and he have intercourse with her and thereby be defiled. If he contracted a serious form of impurity he would not be able to perform the service in the Temple. The idea of a seven day period of separation is also learned from the Torah which also speaks of a seven day separation period, albeit not before Yom Kippur. In Leviticus 8:33 Moses instructs Aaron and the other priests not to leave the Tent of Meeting for the seven days before the Tabernacle is initially consecrated. This separation period is seen by the Talmud as a precedent for the separation of the high priest before Yom Kippur.
Section two: The Torah states that the High Priest makes atonement for his house, and the word house is understood by the rabbis to refer to his wife. This means that in order to be a high priest who can perform the Yom Kippur service, he needs to be married. Hence, Rabbi Judah says that they set up for him an alternative wife, lest his first wife dies right before Yom Kippur thereby preventing him from fulfilling the biblical verse. The rabbis respond that if we start worrying about such far-fetched possibilities, there will be no end to the matter. We will need to worry lest both the first wife and the second wife should die. Since the random death of his wife is unlikely, we dont need to find him a second wife. However, the possibility that he should become defiled is not so unlikely, and hence he does need to be separated from his home a week before Yom Kippur.
I should note that there are some interesting implications from this Mishnah on the rabbinic views of marriage. It is interesting that the rabbis demand that the holiest person in Judaism, the person responsible for the holiest service, must be married when he performs that service. This may be a statement somewhat directed against those Jewish groups who advocated celibacy, at least for their religious leaders. However, we should also note that during the week before his service, he is separated from his wife. In other words, there is some ambiguity here. He needs to be married, for the rabbis generally looked favorably upon procreation and upon sexual pleasure. However, they may have seen marital life as partially distracting and hence dictated a separation during this brief but intense period.