Why Israel lured in Intel to build a modern fab? They could simply buy chips.
Just an example from Russian recent history. Russia launches sattelites which need electronics. There are problems as BAE or other company are restricted bacause "space" or "military" microelectronics is controlled. Of cause weapons need electronics too and they should not depend from supplies, at least they should be replaceable in critical cases. Sattelites can't wait for years too for an approval. As a result Russia has adopted a microelectronics development program. That would be a joke in the begining of the century - it was planned to buy everything until it was not first used as a means of political pressure.