The DoD sure wants to have a major influence on fundamental research and scientific progress. http://www.defenseinnovationmarketplace.mil/FFRDC_UARC.html
The UARCs are DoD's attempts to have influence into fundamental research and engineering.
Those positive impacts probably are still likely due to political factors like you said, but it isn't for lack of the DoD trying.
NATO and the UN both benefit (and suffer) from the power and presence of the US military, but their proudest moments (the German economic miracle, smallpox eradication, historic decreases in child mortality and malnutrition) all stem from smart policy and liberal principles, not from the looming threat of American tanks.
- At some time between 1945 and 1950 the USSR likely would have moved the Iron Curtain all the way to the Atlantic, and quite possibly to the west coast of Britain or even Ireland. Practically anyone who lived under Communist rule in Central- and Eastern Europe would agree that this would have been a Very Bad Thing.
- In the summer of 1950 the Korean peninsula would most certainly have been reunited under the Kim Il Sung regime — this damned near happened anyway, when the U.S. and ROK forces were nearly pushed into the sea at Pusan — and the South Korean economic miracle would never have occurred, to say nothing of the fact that the North Korean gulag would be that much larger.
- Japan probably would have rearmed, and who knows what that would have led to.
Oh, and absent the freedom of the seas heretofore provided by the United States Navy, the world's economy would look very, very different.
As to "smart policy and liberal principles," those are certainly important. But as President Obama said in his Nobel Peace Prize acceptance speech, nonviolence wouldn't have stopped Hitler's armies.
Disclosure: I'm biased — I'm both a veteran and the son of a career U.S. military officer.
You’re begging the question. If a particular means consistently yields good results, is it bad means? When the Roman Empire fell, we call the subsequent period the dark ages. What does that say about whether the Roman Army was good or bad?
I think so. Here's an example: over 3/4ths of released prisoners are re-arrested within five years. Half are re-arrested within a year of release[1]. If my end is substantially reducing the crime rate, I could reasonably claim that mandatory lifelong sentences would achieve that end: recidivism would be eliminated, and there would be a strong disincentive for anybody to commit even minor crimes. But this is clearly a terrible means, both legally and morally: the punishment doesn't fit the crime, and we end up condemning 25% of the prison population to a life in jail because of a statistic.
[1]: https://www.nij.gov/topics/corrections/recidivism/Pages/welc...
I agree that the US military has made positive contributions to the world, but I don't think it's the main source of the Pax Americana -- strong international bodies (NATO, UN, &c), the tendency for democratic nations (the dominant sort in the 20th century) to avoid wars with each other, and advancements in crop science are all individually more responsible for the relative global stability of the last 30 years.
I don't deny that the military had a role (usually financial) in any or all of the above, but I wouldn't call it a causal role: virtually all academic research funding hits the defense world eventually ("food security", "ecological security", &c), especially during the Cold War. That's the result of political contrivances, not any sort of deep connection between the U.S. military and scientific progress.
Finally, I wonder about drawing comparisons between the past U.S. military and current ventures. The Google engineers in question probably wouldn't be designing waterproof radios for fastboats; they'd be training models that "recognize" "terrorists" from afar and systems that pass that information to drones for remote killing. Put another way: the shift away from conventional warfare changes the moral dimensions of working for the military.