In eastern europe it's pretty simple. The collapse of the soviet union left a strong education system and also poverty. Learning to program is one of the most straightforward and doable ways to a good income, so lots of people do it.
Israel is probably a knock-on effect of that, since most (jewish) israelis are (or descend from) eastern european migrants.
> most (jewish) israelis are (or descend from) eastern european
That's a popular, but unfortunate misconception. Majority of Jewish Israelis are Mizrahim that immigrated from middle eastern countries, running from persecution by Muslims.