This verse is situated within a dialogue between Jesus and the Sadducees, a group known for their denial of the resurrection. They present Jesus with a hypothetical situation based on the Jewish law of levirate marriage, where a woman marries seven brothers sequentially, each dying without leaving offspring. The Sadducees use this scenario to question the logistics of resurrection, specifically whose wife she would be in the afterlife. Their intent is to ridicule the idea of resurrection by highlighting what they perceive as its absurdities.
Jesus' response, which follows this verse, is crucial. He explains that earthly institutions like marriage do not apply in the same way in the resurrected life. Instead, Jesus emphasizes the transformative nature of resurrection, where people will be like angels in heaven. This teaching highlights the power of God to transcend human limitations and offers a profound insight into the nature of eternal life. It reassures believers that God's plans for the afterlife are beyond human comprehension, focusing on the eternal relationship with God rather than earthly ties.