Iran got lucky and shot the plane down, probably a lucky shot from a MANPAD. The second one almost certainly resulted from a risky low level mission in support of the search. They couldn’t prevent us from extracting both crew from their own soil. That is impossible to do against a competent air defense.
