Not passing judgment on his morality. Just pointing out that extramarital sex/romance is a drug as deadly as an enemy army.
As an aside, I add "romance" above because the sex drugs (the array of chemicals released in the brain) can be triggered by something as innocent as illicit romance.
It's better to smoke weed than to mess around with this mixture of drugs. Weed can make you lazy and forgetful, an illicit affair will ruin your life.
I know this from personal experience.
Not only that, but the U.S. Army has not been involved in a long-front combined arms war with a peer-adversary since Korea in 1951-52. An actual enemy who can shoot back with artillery and rockets, who has helicopters and jets, has minute-by-minute AWACs and satellite ISR support, etc.
Since Korea, the U.S. military has always fought with total air, EW and ISR dominance. The Battle of Hue City was a skirmish compared to Mariupol or Bakhmut.
Petraeus only has experience at chasing goat herders running around with AK-47s, with the U.S. military enjoying every possible military advantage, and how did those wars turn out?