Don’t forget the last part, “….for they are all living to Him.”
It doesn’t say, “…to everyone“, does it? Why not?
Psalm 115:17 (CEB)…
“The dead don't praise the LORD…”
Ecclesiastes 9:5…
“…because the living know that they will die. But the dead know nothing at all.”
The dead are dead….until the resurrection, which Jesus said is a future event (John 6:44); that’s the only difference between animal death & human death (Ecclesiastes 3:19,20): humans have the prospect of coming back to life! — Acts 24:15.
So “they are all living to Him” in the sense that God is the only one with the power to resurrect them (no one else has it, except for Jesus who was given that power - Matthew 28:18); and He views them as good as living.
Remember, the subject Jesus was discussing was the Resurrection, not an afterlife.
Yes, the whole question was on the resurrection as the Sadducees didnt believe in it so were trying to basically force Jesus to admit that the first five books of the Old Testament or Torah didnt support it. The 'Levirate obligation' they brought up was that if a woman had no son and became a widow, the brother of her deceased husband should take her as wife, and expanded it to a hypothetical, in which one woman had seven husbands consecutively, all of whom were brothers. They thought Jesus could not answer with anything in the Torah, and yet He answered with the words He had spoke when Moses was at the burning bush, ‘I am the God of your father, the God of Abraham, the God of Isaac, and the God of Jacob'.
And you see in the text in Matthew 22, the issue at stake was the resurrection of the dead. While the Sadducees did not believe in the resurrection, they did not believe in an immortal soul either. So the question of the immortality of the soul was clearly not the issue or what Christ was speaking on, it was the resurrection.
Matthew 22:23-34
23 The same day came to him the Sadducees, which say that there is no resurrection, and asked him,
24 Saying, Master, Moses said, If a man die, having no children, his brother shall marry his wife, and raise up seed unto his brother.
25 Now there were with us seven brethren: and the first, when he had married a wife, deceased, and, having no issue, left his wife unto his brother:
26 Likewise the second also, and the third, unto the seventh.
27 And last of all the woman died also.
28 Therefore in the resurrection whose wife shall she be of the seven? for they all had her.
29 Jesus answered and said unto them, Ye do err, not knowing the scriptures, nor the power of God.
30 For in the resurrection they neither marry, nor are given in marriage, but are as the angels of God in heaven.
31 But as touching the resurrection of the dead, have ye not read that which was spoken unto you by God, saying,
32 I am the God of Abraham, and the God of Isaac, and the God of Jacob? God is not the God of the dead, but of the living.
33 And when the multitude heard this, they were astonished at his doctrine.
34 But when the Pharisees had heard that he had put the Sadducees to silence, they were gathered together.
And here Jesus makes it clear what life He is talking about..
John 11:25
Jesus said unto her, I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live:
And when we receive it..
John 5:29
And shall come forth; they that have done good, unto the resurrection of life
; and they that have done evil, unto the resurrection of damnation.