Third, regarding the allegation of those introducing the case, it is added: Therefore there were seven brothers, and the first took a wife and died without children. And the next took her, and he himself died without a son. And the third took her. Likewise also all seven, and they did not leave seed and died. Last of all the woman also died. It could be that they fabricated this as something possible: whence the Gloss: "Those who do not believe in the resurrection of bodies and think that souls perish with the body fabricate the baseness of a fable." The Jews are accustomed to occupy themselve...s with such fables: on account of which First Timothy 1: "I urged you to remain at Ephesus, that you might charge certain persons not to teach otherwise nor to attend to fables and interminable genealogies, which furnish questions rather than edification." Or it could be that this happened literally and is introduced here according to the spirit of divine ordinance on account of the figure. For spiritually, by these seven who died without children, is understood the universality of the reprobate, who left no fruit: whence the Gloss: "These seven are all the reprobate, who throughout this whole life, which consists of seven days, are barren of good work." These can be understood through the seven husbands of Sarah, of whom it is said in Tobit 3 that they were killed by a demon named Asmodeus: because in Wisdom 3 it is said: "The seed from an unlawful bed shall be exterminated."
Or by the seven husbands are understood the seven capital vices, which the soul serves, concerning which Luke 11: "He takes along seven spirits more wicked than himself."
Or the five senses and the twofold consideration of reason, which are understood through the woman with seven husbands: of whom it is said in John 4: "Call your husband." For he who subjects himself to the senses of the flesh bears no fruit: Job 24: "He fed the barren woman who does not bear, and did no good to the widow"; because, as is said in Galatians 6, "he who sows in the flesh shall from the flesh reap corruption"; and First John 2: "The world passes away and its concupiscence."
Source: Commentary on Luke, Chapter 20