You forgot the other option: abbreviations like IPアドレス, HDD, etc. This is quite common when you start getting long, unwieldy strings of katakana.
I think there are multiple factors going on:
People who work in electronics/computing are more likely to have a good command of English, and know the terms in English, and direct borrowing of English terms is quite natural in that case. Particularly if the meaning of the term in English, in the computing context, is not directly the same as the dictionary meaning of the word, making it more sensible to transliterate rather than translate.
Where there is a pre-existing kanji compound that fits the bill and isn't ambiguous, that will be used.
There is a general trend to use more katakana, so terms that are older, like 半導体, are more likely to have kanji forms.
The person who names the item, or at least gives it the name that sticks, as sometimes there are multiple versions, will have their own personal preferences. (This might be the inventor, the documentation writer, translator, textbook writer...)
Why not just stick with one method?
To turn it about: what would be the benefit of doing so?
In many cases these will be compounds of existing terms, and you're sticking together a concept usually expressed in katakana and one for which a standard kanji term exists, it is logical that the result will be part katakana, part kanji.
To borrow from sawa's example, if "メモリ" has an existing meaning (separate from 記憶), and 不揮発性 as well 半導体 are existing terms, then 不揮発性 + 半導体 + メモリ is an easily understandable compound. There's no particular advantage to replacing the word "メモリ" with a less-used kanji equivalent.
If all the parts exist in katakana, you'll get an all katakana string (although this might end up being shortened: メディタブ I've seen; スマホ is probably as common, if not more, than the full equivalent). If all the parts have kanji then you'd get a long kanji compound (for example: 超々大規模集積回路).
Now for an opinion from somebody in the field, from this blog.
The main reason he gives near the bottom as to why there are a lot of katakana words in IT in particular:
時間がない (there's no time)
The pace of the IT industry is fast, and there are constantly new terms/concepts being invented. There isn't the time to come to a consensus on the standard translation for each one. So transliterating into katakana is the easiest way. Even if you were to coin a kanji term, chances are that the majority would just use the katakana word.