Some Sadducees, those who say there is no resurrection, came to him and asked him a question, "Teacher, Moses wrote for us that if a man's brother dies, leaving a wife but no children, the man shall marry the widow and raise up children for his brother. Now there were seven brothers; the first married, and died childless; then the second and the third married her, and so in the same way all seven died childless. Finally the woman also died. In the resurrection, therefore, whose wife will the woman be? For the seven had married her." Jesus said to them, "Those who belong to this age marry and are given in marriage; but those who are considered worthy of a place in that age and in the resurrection from the dead neither marry nor are given in marriage. Indeed they cannot die anymore, because they are like angels and are children of God, being children of the resurrection. And the fact that the dead are raised Moses himself showed, in the story about the bush, where he speaks of the Lord as the God of Abraham, the God of Isaac, and the God of Jacob. Now he is God not of the dead, but of the living; for to him all of them are alive."
The law being referenced is from Deuteronomy 25.5. Its purpose was so that a man's name "not be blotted out" and "to build up his house." The first part of Jesus' beautifully simple repudiation of the Pharisees addresses marriage. Its purpose is contained within the realm of this life. It does not stretch out into eternity. There is no such thing as marriage in heaven nor do the blessed marry. In that respect "they are like the angels."
The life of the blessed in heaven is anticipated even now by those who remain single for God's kingdom. It is so easy to lose sight of the precious charism of virginity in a society where people are encouraged to remain single for the sake of the Kingdom of Earth. The Church, in rightly combating the attack on the family from so many fronts, can seem excessively family oriented in certain countries and times. Even so, the fact remains that the person remaining single for the kingdom follows a higher calling and the rarer path. This is made known in this passage, in Matthew 19.10-12, in Paul's letters and elsewhere. Even so, "let each of you lead the life that the Lord has assigned, to which God called you." (1 Corinthians 7.17)
Above all, the eternal values of the kingdom which we seek, the fruits of our lives which issue unto eternity, must in no way be looked for among the small kingdoms we have built for ourselves on this earth.