And what follows: The families and families shall mourn, or tribes and tribes, apart: the families of the house of David apart, and the wives or the women of them apart; this signifies that in a time of tribulation and grief we ought not to be given over to marriage and the work of wedlock. Hence also in Joel, when the captivity was near, it is said to the Jews: Let the bridegroom go forth from his chamber, and the bride from her bridal room. And when the flood was impending, Noah is commanded: Enter into the ark, you and your sons, and your wife, and the wives of your sons. And afterwards, wh...en the flood was over, it is said to him: Go out, you and your wife, and your sons, and their wives, so that those who had been separated in the ark while the peril hung over them, once restored to the world, might devote themselves to begetting and to children. And this is done not only in a time of distress but also in a time of prayer, when we wish to entreat the Lord, as the Apostle says to the Corinthians: Do not defraud one another, except perhaps by consent for a time, that you may give yourselves to prayer. Therefore now too the tribe of the house of David, and the tribe of the house of Nathan, and the tribe of the house of Levi, and the tribe of the house of Shimei are separated from their wives, so that they may mourn the only-begotten and firstborn Lord Jesus, of whom it had been said: His blood be upon us and upon our children. In David the royal tribe is understood, that is, Judah. In Nathan the prophetic order is described. Levi refers to the priests, from whom the priesthood arose. In Shimei the teachers are understood, for from this tribe the hosts of the masters sprang up.
Source: Commentary on Zechariah