The work I did absolutely had positive impact on the world.
People rush to criticize and write off working in the defense sector, but it can be a very rewarding place to work. There are absolutely problems in that sector - bad management and regulatory capture being primary among them. (Ultimately, those are why I left.)
It’s hard to judge accurately from the outside. That’s the nature of classified work: by definition, you can’t know what you’re getting yourself into until you’ve jumped with both feet.