It was more complicated than that. In reality, Israel sided with the US - rather than the UK and France, though those two NATO powers came with their more powerful ally - in the Cold War for the same reasons many other nations did; the US was clearly the stronger of the two superpowers, posed less of a threat to Israel's national sovereignty and economic system than the communist USSR did, and it was willing to sell Israel weapons with which to fight off its Arab neighbours.Basically, Israel doesn't like Arabs, and the British and the French still wanted to control the Arabs, so they were pretty much inevitable allies. Once it became clear that backing Israel would also mean backing the British and French, the Soviets backed out.
The USSR was also willing to sell Israel weapons and back them diplomatically, seeing that Israel was the dominant military power in the region, but since Israel wasn't willing to quid pro quo with the USSR in the same way it would with the Western powers, the Soviets jumped at Nasser's offer to give them a friendly state in the region. More specifically, the Soviets realised that backing Israel brought them few benefits, whereas backnig Egypt, though obviously the weaker party, gave them a great deal of 'cred' with the international anti-colonial movement.
Selling weapons to Egypt - and later, other Arab states such as Syria - also provided the USSR's sole thriving industry, armaments, with a willing and consistent buyer. Egypt was the first non-socialist nation to purchase armaments from the USSR post-WWII (though the first shipment came from Czechoslovakia, not the USSR itself) and the Soviets quickly grasped the economic benefits the international arms trade could bring them. When Egypt jumped in to the US camp during Saddat's rule, it was a significant blow to both the Soviet weapons trade and its diplomatic prestige.
Funnily enough, Czechoslovakia had also been the first nation to sell armaments to Israel in 1947, with Soviet permission. Without those armaments (which consisted mostly of captured German equipment, with an assortment of Soviet materiel added), Israel would have been thoroughly beaten in the first Arab-Israeli War.