It is not rational. Alot of it is based on religion. Some of it is that people need a scapegoat. For a country like Syria or Iraq which is ruled by a dictator, and even Egypt, where their economies are in shambles, the people are oppressed etc. hatred of Israel unifies the country and takes away attention from the internal problems. This is probably why Hafez Assad never signed a peace treaty with Israel. If he had, what would then be his justification for martial law? What would he do when Israeli's came to visit and had money to spend, people might get jealous and start asking questions. Natan (Anatoly) Sharansky a former prisoner of conscience in the Soviet Union and now a cabinet member in the Israeli government has said many times that a democracy cannot really make peace with a dictator because it is the dictator's interests to have external enemies to unite his country.

As for Castro, he is anti-US and anti-West, Israel is perceived as a US ally therefore he is against.

As for other countries, money talks, and Western Europe needs oil from the Arabs and would like to sell them arms.