Gen. David Petraeus, the former head of the CIA, stepped down amidst revelations he had been having an extramarital affair with his biographer, Paula Broadwell.

But no laws were broken, so why did Petraeus need to quit?

Former CSIS intelligence officer Michel Juneau-Katsuya said a combination of poor judgment, secrecy and questionable security indiscretions on the part of Petraeus all created an environment where he had little choice but to resign.

"It's a question of trust, it's a question of breaking, of breaching the trust of the people that he leads, the people that he's in charge and of course his boss, Mr. Obama," Juneau-Katsuya told CTV's Canada AM.

The relationship came to light after the FBI uncovered evidence of an affair between Petraeus and Broadwell after she sent harassing emails to Jill Kelley, a family friend of the Petraeus clan whom she apparently considered to be a rival.

While the FBI only found personal indiscretions were carried out by the former CIA boss, and there was no criminal activity, the revelations will permanently tarnish the reputation of the previously well-respected military leader, Juneau-Katsuya said.

Blackmail risk

It also put him in a vulnerable position, had anyone wished to exploit the situation.

"When you're in a position like this where you have access to phenomenal secrets, you just position yourself in a capacity to be blackmailed, blackmailed not only by a foreign entity but you could be blackmailed also within the United States because we know the rivalry that exists between the Republicans and the Democrats," Juneau-Katsuya said.

"So at this point he's basically affected the trust Mr. Obama needs to have in him. He broke his (trust) with the people that he's leading, but he's also positioned himself now as a potential security risk."

There are also concerns that Broadwell may have been privy to secret information. Video has surfaced in which she tells a group of university students that the CIA had taken Libyan militia members prisoner, prior to the attack in Benghazi that led to the murder of the U.S. ambassador to Libya, Christopher Stevens.

Broadwell told the students the attack on the consulate could have been an attempt to get those prisoners back. The CIA has denied Broadwell's claims, but the comments have caused many to wonder whether she had inside information or was simply confused about what happened.

Poor judgement

Had Petraeus taken the initiative to admit to the extramarital relationship on his own accord, it's possible the affair could have been dealt with quietly, allowing him to keep his job, Juneau-Katsuya said. However, the moment he allowed himself to have embarrassing personal secrets that could be held against him, Petraeus became a liability for the United States, he said.

"It's definitely something that couldn't be tolerated by the Obama administration. The fact it was revealed by the FBI and not by him coming to his boss as well was definitely an element that broke the situation."

In fact, it was Broadwell’s decision to send harassing emails to Kelly that revealed the relationship. Kelly complained to the FBI about the messages accusing her of inappropriate flirting with Petraeus, triggering the investigation. That eventually led the FBI to Broadwell, and a search of her personal email account turned up sexually explicit emails from an account belong to Petraeus.

And although the FBI discovery was not revealed until after last week’s U.S. presidential election, the situation could have affected Obama's chances of re-election if the scandal had come to light in the media prior to the vote -- giving Obama one more reason to feel uncomfortable with Petraeus.

Eventually, Juneau-Katsuya said, Petraeus must have realized his position was simply unsustainable. He is now reportedly focusing on his family -- which includes the two grown children he has with Holly, his wife of 37 years.

"Being a good soldier that he is, he realized he made a mistake and should not risk creating any embarrassment for his boss. Obama doesn't need this. So it would be honorable and the rightful thing to step down