Even if in the world where the military does pay salaries on par with the Google farm, very few people will make the switch. The military would have to pay likely an unreasonable amount premium to get any appreciable amount of people because many have an aversion to the military industrial complex. And for good reason too I might add.
People want to work on things that will help change the world and improve the quality of lives of other people, not make it easier to kill. You can argue that working on B2B software contributes little to improving humanity, but at the very least, it isn't actively harming anyone.
And the examples of moonshot technologies that are being developed in fields like cancer treatment, curing aging, self driving vehicles, etc. which are being made possible due to innovations in places like Silicon Valley should show you that technology can and is being used to change the world for the better.
Technology at the end of the day is a force multiplier that I would hope is directed towards purposes not devoted to zero sum games like waging war.
You're right tho. Free and prolific trade is the greatest anti-war force we have ever seen. Having mutually dependent economies raises the cost of war to heights that exceed the threshold of tolerance.
Plenty of military/government projects have changed the world for the better (ignoring geopolitics) including: modern surgery, the internet, GPS, cellphones, microwaves, canned food, duct tape, etc.
What makes you think those innovations would have been created without the military? The US military does a lot of research that doesn't have immediate practical/commercial applications. They cost a lot of money, and don't have obvious payoffs, which make them a poor candidate to be funded by private investment.
Just a nicer way of saying advancing the capability to wage war. Trying to hide the reality behind a veil does not remove the facts. War I repeat is a zero sum game, and contributes nothing to humanity besides the petty interests of nation states.
I agree with you though that the military does a ton of fundamental research. It's just a shame that for many scientists, the only way they can get funding is by being forced to think of ways that their area of research can be applied towards killing and destruction. There's a reason why in the greater scientific field, but especially that of ML/AI, that so many researchers are so adamantly against working on military applications of their research.