You have it wrong: the Arab Jews were betrayed BY their countries, not the other way around.
You have to understand that, despite the cheery image portrayed by a lot of people of pre-Israel Middle Eastern Jewish life....it wasn't always sunshine and rainbows. The Farhud of Iraq in 1941 is a prime example of the mob creating problems for the Jews, but there were issues all around before. Egypt for one instituted anti-Jewish policies prior to even WWI, and there was genocide in other places like Syria ( a really bad one not even a hundred years prior of Israel) so in most places Jews remained quite guarded. Yemen, for one, was always #$%^ and it's really no surprise that so many left quickly. Seriously, look how Jews lived there - lawfully forced to clean latrines, not allowed to ride camels lest they be taller than a Muslim, sometimes having their daughters taken to forcefully wed Muslims, and in such peril that they have to live within governmentally protected compounds - and you'd not wish to have their lives.
They didn't leave because of their religious beliefs: They left to escape the persecution, discrimination, and violence that faced them if they remained. Keep in mind that over 99% of the Jews did leave, which really indicates how bad the Arab world was. Yeah, many did choose Israel for religious reasons....but, that doesn't mean that they wouldn't have chosen to stay if the societies accepted them. And it's not like they had all the choices in the world to flee elsewhere, as Israel was often the easiest option for them.
I really can't emphasize that they would've stayed if they could. The Jews in the Middle East were rather rich and prominent....but, as WWII only a few decades before them showed, having money and status do not prevent you from being unfairly targeted, and many of their things were already starting to be taken away. Jews were often prevented from leaving the nation, barred from certain jobs as time went on, hung without trial for "Zionism" because of nothing more than hateful rumors, and when they did get to leave the nation, they had to promise to not go to Israel and were limited to one suitcase and the ability to carry only a limited amount of cash. Everything else had to be left behind. They were wealthy....so do you think that many would've chosen Israel if they had to, given that they went there and had to start from square one?
In the end, they did prefer life in Israel because at least they knew they were protected and safe. If that's betraying their countries, then those nations weren't worth a damn to begin with. Sure, there are some Jews who remain in Egypt...mostly Jewish widows who are elderly and married Muslim men, so their children aren't Jewish at all. The majority of the community fled, because they lacked protection from a society that was out for their blood simply for being Jewish.
I've attached a blog of people who post stories and evidence that the Middle East wasn't a Jew-friendly paradise. They take great pains to document the tragedy that is the "Jewish Naqba".
Edit: I am sticking to the main question, sorry if it's a tl;dr type of answer. You could seriously teach entire courses on this subject.
Still, after the war with Israel, many Jews simply didn't leave because they wanted to for religious reasons. No, they left because EGYPT MADE IT UNBEARABLE for many to stay. Perhaps your sources aren't the best at illustrating this but it did happen, as former Egyptian Jewish nations will bluntly tell you, even in Arabic. However, it's really not a surprise since Egyptian anti-Semitism did predate Israel's ascent, though it just became far more encouraged and mainstream afterwards. The Egyptians were horrible to their Jews before a small number of spies may have told Israel anything, which in any case shouldn't justify the torment the normal people were put through. The Jews were RICH but that was starting to be taken from them in Egypt, as well as their safety and dignity, and were forced to leave these riches behind for more impoverished conditions in Israel. Simply, being alive is better than being dead, which is why they left. What part about this don't you get?
If you think this is uncharacteristic for Egyptian society, look at the treatment of Copts today. If you think this uncharacteristic for Arab society, look at grievances that the Christians, the Kurds, the Assyrians, the Baha'i, the Yazidi, the Amazigh (Berbers), and other groups have. Concerning the Christian flight from the Middle East, they are SPECIFICALLY citing the previous Jewish exodus as what is happening to them now.