So what's wrong with it?
First, things I work on are sold to both sides, in my case to a country well known to shit on human rights... And a few GUI/feature tweak later it's sold to another more respectful one.
Also, in a more general way, the main purpose of it is to kill or fear peoples, peoples with different/unaccepted ideas, peoples who disagree with the weapons owner.
Does it sound right to you?
Of course it's approved by the government, but it sounds way more like a money driven decision than a smart one. And when I ask people how they feel about it, nobody cares, typical responses:
"We are not working on a weapon, we are working on --any subsystem that doesn't sounds like a weapon--"
"I'm not the one who sell it!"
So it's nobodies fault, like during the WW2, "I'm just driving the train, I have nothing to do with deportation"
And what happens when the conquering despot is my country (Dick Cheney's team)
Imagine if worldwide knowledge of science regressed to 1900 levels. Imagine if worldwide engineering capabilities regressed to 1900 levels. Imagine if worldwide educational opportunities regressed to 1900 levels. We would consider any of these things to be disastrous.
Now imagine if worldwide weapons technology regressed to 1900 levels... that doesn't really seem all that bad, does it. You could even come up with a strong argument for it being a good thing.
Investing money and effort into making weapons is the literal definition of an arms race. A zero-sum game. If everyone does it, everyone loses. This would obviously never happen but if every single engineer in the world refused to work on developing new weapons, the world would be a better place tomorrow.
Regarding Google: They work on a ton of products that genuinely make the world a better place. Gmail, google search, google news etc etc. That does give the company as a whole a halo.
Regarding Facebook: I somewhat agree with you that social media in general is overrated, but many others do genuinely believe that it improves their quality of life. I may not buy it myself, but Facebook can make a strong case for how they are making the world a better place by better connecting people.
Obviously some people make weapons so not everyone believes they have the same obligations.