How did Iran, al-Qaeda end up in bed together?

The Jerusalem Post

The wild world of intelligence: Were Jerusalem, Tehran both side shows in the latest attack that took out Abu Muhammad al-Masri? https://www.jpost.com/middle-east/how-did-iran-al-qaeda-end-up-in-bed-together-649333