Luke identifies Jesus' questioners as Sadducees 'which deny that there is any resurrection.' Their elaborate case of a woman successively married to seven brothers is therefore not neutral curiosity about marriage.
It is an argument designed to make resurrection belief look incoherent.