Former CIA chief David Petraeus says the US attacked Iran to scuttle its ability to defend itself against Israel.