Still, to a great extent, the biggest contributing factor to the current extremely low Jewish populations in the Middle East outside Israel has been migration or flight to Israel. For example, in Iran, even before the Islamic Revolution and the wave of antisemitic persecution that followed it, which could be described at least as ethnic cleansing if not outright genocide, there had been significant migration of Iranian Jews to Israel.
The establishment of Israel in 1948 and its Law of Return, which grants automatic citizenship to Jews worldwide, made Israel an appealing destination for many Jewish emigrants from Iran, that's why the overwhelming majority emigrated, but there were also substantial numbers who resettled in the United States, particularly in cities like Los Angeles and New York.