Setting other injustice aside. In many cases of cooperative spying, US tech companies had no means by which to refuse. They were legally compelled to comply. They were legally compelled to shut up. While it would have been an amazing act of courage, and rebellion, Apple, Google, etc. surely were not going to burn their businesses to the ground just to poke the spooks in the eye. Only a handful willingly volunteered to snoop such as Verizon, AT&T (if memory serves).
In many cases such as Cisco, and Juniper, the NSA and co were intercepting shipments of hardware to customers and modifying them. Google was victim of NSA man-in-the-middle attacks.
The power brokers in the military industrial complex need the slap down.
It might seem easy. It might seem to make sense. But no matter what the thing is, guns, drugs, food, etc. you will never succeed in tackling a problem by dealing with the supply of something. Given sufficient demand, there will always be a supply or a near-equivalent alternative. History refuses to tell the story differently. Supply side restrictions always fail.
The problem itself must be tackled, not the tools, not the side-effects. You have to address demand. If someone wants to cause harm, they will, by whatever means are available to them be it a gun, a kitchen knife, or a number 2 pencil. Desperate people perform desperate deeds. Malfunctioning minds conceive malformed intentions. Start here first, not last, if ever.
It's as stupid as algorithm export bans. Supply of anything is rarely hampered for long provided sufficient demand. However, given a vacuum of good ideas invented by a certain political party, that party will happily supply bad ones. Should the other side manage to come up with something better, of course they'll make sure they encounter roadblocks.
Spoken another way. Conservatives seem to like to keep with the tradition of attacking supply. Liberals try to attack the demand. Since the latter came from the liberals it of course is socialism and therefore evil. It's unclear how successful tackling demand would be, but hitting supply is good for the MIC and prison industry even if it has a clear historical demonstration of failing to solve the original problem.
The brain is a wonderful organ; it starts working the moment you get up in the morning, and does not stop until you get to work.