He obviously found out something embarrassing to the boss. He had to be fired.
Ah Petraeus betrayed US by bedding a married woman. Until the Republicans found out about his 'secret' activity he was good to go to testify.