Egypt recently arrested several dozen Islamic terrorist suspects, most of them connected with Hezbollah in Lebanon. Egypt was supplied with valuable information about this network by intel agencies in the United States, Britain, Germany and Israel. Especially Israel, which keeps a close eye on Hezbollah. Iran has been putting more intelligence (and counter-intelligence) people into Lebanon, and has been catching more Israeli agents. Or, it may be that Israel is pushing its Lebanese agents more to find out what Hezbollah is up to. That puts agents at risk, but Israel knows the Iranians are bearing down, and may soon have nuclear weapons.
Iran has shifted its terrorism efforts from Iraq (where efforts failed) and Afghanistan (where backing the anti-Shia Taliban was unpopular in Iran) to Israel and Egypt. Why Egypt? Because it, along with Saudi Arabia, is one of the major Sunni Arab countries opposing Iran, Iranian nuclear weapons programs, and Iranian plans to become the leader of the Islamic world, and spread the minority (about 10 percent) Shia form of Islam, at the expense of the majority (over 80 percent) Sunni form.
Iran isn't as vocal about this as it would like to be, because they also believe all Moslems should be united in their opposition to Israel even existing, and the Christian West in general. This view is not shared by many of Moslems, and Iran knows it. But being true believers, the militants who control Iranian diplomacy and special operations, consider terrorist attacks against Israel (a hard target) and Egypt (a much easier target) a suitable consolation prize.
Egypt does not like being on the receiving end of this kind of attention, and doesn't like being beholden to Israel either. But what can you do? The Iranian plot apparently included sinking a large ship in the Suez canal, thus depriving Egypt of a major source of income for many months. It's like bombing a nations oil wells, but without the spectacular visuals.
Iran is also trying to stir up trouble on the Arab side of the Persian Gulf. There, Shia minorities live in a permanent state of unrest, and don't need much encouragement to get violent. Not all of these Shia are restless, but enough of them are to create a real threat. Iran has to be careful stirring that pot, as the Gulf Arabs are heavily armed, and there are still lots of American troops in Iraq and Kuwait.
So big, disorganized and vulnerable Egypt has become a major Iranian target. And any Egyptians who tried to ignore this, just got a reality check with the recent arrests. Egyptians also have to get their heads around the fact that Israel and many Arab states are allies in their jihad against non-Arab Iran.