I would suspect that the Galil was dropped as a front line weapon because it offered no advantages compared to the lighter and more ergonomic M16A1s which Israeli was getting for free or reduced cost from various U.S. military aid programs.
Printable View
I would suspect a couple of reasons why the Tavor came in existence. First, Although the U.S. provides Israel with large amounts of military aid, that aid can be fickle and it makes a lot of sense for Israel to still have the capability of making modern small arms especially since they are surrounded by enemies and potential enemies. Second, having a thriving small arms industry is good for export reasons as well. Finally, many of Israeli M16s were provided for free during and immediately after the 1973 War (Operation Nickle Grass) whereas any new M4 would have to be paid from the annual Military Aid budget from the United States.
Obama.
I would ass-u-me after having him has the US President for eight years with his anti-Israel / pro-Palestinian sentiments the Israelis wanted something in house in case aid packages dried up. Honestly I'm surprised that IWI has not manufactured their own M4 variant by now.
The development and plans for widespread adoption of the Tavor began in the mid-to-late 1990s and adoption began during the tenure of George W. Bush.
The history - which Israel is all too aware of, even if Americans are eager to forget it - is that the US has engaged in arms embargoes against Israel and Israel is not about to tie themselves to anything that can so easily be cut off ever again.
deleted
To be fair I dont think the Tavor failed too badly but it certainly didnt do as well as the AR
https://www.youtube.com/watch?v=yyaSAuT0NR0
Another take on reliability of Tavor - https://www.tactical-life.com/firear...-torture-test/
Why Israelis replaced M4 with Tavor - https://iwi.us/why-the-idf-chose-the-tavor-over-the-m4/
Can't say that I've ever dumped mud into my Tavor. What I can say is that I've put over 1000 rounds through it with 0 issues and seen 4 other people put a bunch of rounds through there rifles with 0 issues.