Even on matters of comp it needn't simply be "give raises to all the engineers", as pro-tech unionization efforts tend to also support non-technical workers such as the custodial and cafeteria staff, who would be in higher need of pay raises. The pay for engineers is usually more directed towards addressing unpaid overtime, which is more of a work-life balance/anti-death march measure more than a monetary one anyway.
Corporations can't vote, but they do have free speech when it comes to political expression, and tech companies already do plenty of lobbying. Perhaps they could have spent some fraction of those efforts on influencing the housing shortages in the places they set up camp in. Being a good, responsible neighbor should be part of CSR.