Kansas’ abominable anti-gay segregation bill already feels like a distant memory. Only two days after it overwhelmingly passed the state House of Representatives, the state Senate effectively killed it, leaving little in its wake except a wave of outrage and a smudge on the state’s reputation. Yet while the dust has largely settled, a central mystery remains: If the bill’s passage was far from assured, why did representatives vote on it in the first place? Why did the Republican Party overwhelmingly support a divisive and controversial bill that stood a good chance of dying in the state Senate? Here’s one theory to explain the vote that outraged a nation.

Recent polls have indicated that deeply conservative Kansas Gov. Sam Brownback, who faces re-election this November, is surprisingly vulnerable, possibly even trailing Democrat Paul Davis, the current House minority leader and probable Democratic gubernatorial nominee. Brownback’s fundraising has also been unexpectedly shaky, while Davis’ has been remarkably strong. Part of Davis’ ascendance in the polls depends on his business-oriented strategy: His campaign has sedulously avoided social issues, sticking to economic and education matters. And, on those fronts, Davis is winning.

Brownback knew he needed to force Davis’ hand to bring social issues into the spotlight, but Kansas law is already as anti-gay as it can be. In order to revive a moot issue, Brownback may have surreptitiously encouraged and approved the House version of the Kansas bill. (Prior to the vote, the governor consistently claimed he hadn’t yet read the bill—a shocking claim, given that it’s a mere two and a half pages long.) From there, everything went according to what I suspect was Brownback’s plan: Davis voted against the bill, but he did so very quietly so as not to alienate moderate and conservative Kansas Democrats. As a result, the left, yearning for a more vociferous champion of equal rights, grew disenchanted with Davis’ muted opposition. What’s more, the right now has a club with which to bludgeon Davis when social issues arise in the gubernatorial race.

If this theory is correct, Brownback’s maneuver is both deeply shrewd and jarringly callous. The Kansas House faced derision across the country following the vote, and Republicans in the state Senate openly labeled the bill “discrimination.” Brownback essentially threw his own party under the bus in order to score a few political points. In interview after interview prior to the vote, he studiously avoided supporting the bill as it was written, instead praising the broad principle of religious liberty without explicitly endorsing the bill at hand. His words certainly gave the impression of support. But now, following its calamitous implosion, Brownback has continued to refuse to comment directly on the bill that drew shock and fury nationwide.

The end result of all these possible machinations is, of course, delightfully ironic. Republican legislators who voted for the bill thought they were harming gay people and their families. But it turns out that the true victims of the bill aren’t gay people, but rather the lawmakers themselves, who may have sacrificed their reputations on the altar of a flailing, egotistical politician. That kind of poetic justice is far too rare in politics today. We should enjoy it while we have the chance.