And you basically followed with it. Basic science is the foundation engineering builds on. I believe 1st semiconductors were a science experiment. Em waves were. Gigantomagnetoresistance was. The internet was an academic curiosity.
It think it's important to blow some of human work on the free thinkers. It moves the popluation forward. Any other comparable scientific and engineering progress I can think was fueled by war.
Imho allocating resources only for acute goals lead to local technological optima. Seemingly puporseless research helps to break out.
I'm pretty sure the transistor [1] was invented specifically to solve a real engineering problem.
[1] I'm taking your use of "semiconductor" to mean transistor because my understanding is semiconductors are a kind of material that was discovered, not invented.
Today number theory is the basis for several important fields of application, including computation theory, modern cryptography, and numerical calculation.
Also in modern times, especially, there is a big problem of discoverability. If the mathematical result you need for some application is buried in a thirty-year-old journal using unfamiliar terminology, what are the chances you'll find it and understand it when you need it? I venture to suggest that much of the time it's easier to re-derive the result than to find it.
https://www.asc.ohio-state.edu/kilcup.1/262/feynman.html