Forget the political angle. I don't think companies are moving due to politics, per se. I think they're moving for economic reasons, to which the politics can contribute but which also include other considerations. WRT Silicon Valley in particular I think housing prices for the workers are definitely a factor. The ratio of highly paid vs moderately paid workers in a tech firm have to be relatively low, so whether the few can fully enjoy the coastal lifestyle or not it ultimately matters what the lower paid workers can afford.
If you're a $100k/yr tech worker and can barely afford to rent a 2bd apt in the town where you work you might have aspirations of owning your own home that won't be possible to achieve in Silicon Valley. At that point those $300k starter homes on the south side of Austin might provide a strong motivation to relocate.