The Sadducees thought the idea of resurrection to be silly. Maybe they had been influenced by Greek thinking, maybe they felt you could not build a good case for it based on the Scriptures. But they thought it silly and had come to the conclusion that Jesus believed in it. Since Jesus was a prominent teacher, they thought it would be fun and instructive to publicly humiliate him and so concocted their over-the-top scenario that exploited the old Israelite practice of levirate marriage to wonder what a woman who on earth had seven husbands would do in the afterlife.
The set-up reminds you of the time someone wanted to get under the skin of C.S. Lewis. Lewis was fond of suggesting that in heaven, animals (and maybe even our cherished pets) could very well find a place. A person who thought that to be silly snidely asked Lewis "Well, what about the mosquitoes?" to which Lewis replied that God was clever enough to combine a hell for humans with a heaven for mosquitoes! (Or it reminds you of the famous line, attributed by some to Augustine: when a cynic asked what in the world God had been doing in all those eons prior to the creation of the universe, Augustine was said to reply, "He was making hell for the curious.")