All of this "not-space" spending is still money going towards research and innovation. Going deep into space is essentially the peak of aeronautics innovation; any sort of research like what you listed above is still a decent step towards a final goal.
Note, I'm not saying this money was spent optimally, but I am saying that this money was not wasted by any means.
Note, I'm not saying this money was spent optimally, but I am saying that this money was not wasted by any means.