Besides being an army guy, Patraeus was a political force. As such, he had a kind of permanent feeding-frenzy of subordinates and hangers-on, swirling about him, like so many pilot fish, much as a president or any famous politician does.
Someone was out to get Patraeus (I have no idea who), but it says something about our culture that whomever it was that wanted the head of David Petraeus wasn't able to undermine him because of his professional record, and instead used the bullet-proof unauthorized sexytime gambit to pierce the general's balloon.
Patraeus's professional record is unclear. He was unsuccessful in Afghanistan, largely because that war is clearly unwinnable, and appeared to have won enough to declare victory in Iraq through the time-honored expedient of buying off enemies, which was sold to the news consumers back home as "the surge."
But this is still such a formally puritan society that the only sure-fire silver bullet for a hunter of high mucky muck scalps is the quarry getting caught messing around, and it's good-bye public life.
But it doesn't always work any more. I remember Nikki Haley, during her campaign for governor of South Carolina, admitted to unauthorized sexytime with a guy not her husband, and stayed in the race anyway, and won.
Could be these kind of tired, old, sex rules are only still invariable among the federal bureaucracy.