It did not happen because there was no Israel. Now Israel exists so the problem should be fixed.
The British stole land from the Palestinians and gave it to the Jews. The Sephardic Jews, for example, used to live in Morocco, that's what they used to consider their homeplace. But after all the things that happened in Palestine between the 1930s and 1970s, that's when the tension between Jews and Middle Eastern people came.
There are more than a million Moroccan Jews nowadays, 1,180,000 to be more precise. And only a tiny minority of the Moroccan Jews live in Morocco now, the others all left.