"Gleaning from the Gospels, the line on the Sadducees I'd heard was that they were the over-educated, liberal poofs of their day, whereas the Pharisees, while mired in legalism, were relatively less off-course."
Hmm, I dont know about that. My read of the NT definitely wasnt adulatory to the Sadducees but I always thought the Pharisees came off as even worse there. The big BC power struggle in judaism was between the Zadok priesthood and the Pharisees, but it was effectively over in Judea when the Maccabees usurped the High Priesthood. (Ironically sons of Zadok survived later in Samaria.) The Maccabees destroyed the country repeatedly but they are idolized by the rabbinates precisely because they destroyed the priesthood and the rites and laws ordained in the Torah, allowing the rabbis to usurp their place with new rites and laws. The Sadducees were so sad in part because their struggle had been lost before they were born, and they had no animating principle or focus. There were many other groups - the early Christians, the Essenes and whatever group one would posit for Philo, for instance. All of these to some degree feed into karaism as it developed, but there was no constant unified name or identity beyond just being jews that embraced the Torah while viewing the 'oral law' stuff with skepticism.
But the impetus for actually proclaiming it 'officially' and giving it a name and turning it into an identified movement was very practical and concrete, and again the context was political power struggle. The Gaonate usurped the Exilarchate over time, starting the moment of Islamic conquest if not before. It came to a head with Anan ben David. He was the rightful crown Prince, but the Gaonate had acquired the theoretical right to appoint their own boss from the caliphate already, and chose this moment to assert it practically, choosing his brother. There were many jews that were skeptical of the rabbis, not just in academic or theological sense but also of the governance of the Gaonate and Anan stirred them up with speeches, causing a bit of a disturbance. The rabbis run to the Caliph and accuse him of insurrection. And so he is locked up.
So Anan is jailed by the caliph, who is actually a friend of his and hates to do it, but technically they are right - by challenging their right to appoint the exilarch he challenged the authority of the caliphate as well. But the rabbis are busy too - one of them, Natronai, denounces Anans brother Josiah and proclaims himself the new Exilarch, so instead of two factions of jews rioting against each other and disturbing the caliph there are now three! Also he receives word that North Africa and Spain have erupted in revolt, and an army of Franks has been seen sailing for the area as well. Sounds aggravating doesnt it?
So the caliph offers a way out - just declare a different religion, separate from judaism over whom the Gaonate at this point has the legal control. And this was instantly recognised, giving not just Anans followers, but all the jews that were rejecting the Gaonate, a legal existence throughout the caliphate - which of course stretched from India to Spain at the time. A legal right to continue to exist without having to answer to and obey the Gaonate. And a legal contination, at least for some time, of the line of David in a (separate) exilarchate.