It's not just tech companies who need tech workers. Many companies outside of tech need tech workers. And those companies can be located anywhere.
The problem is the cost of living is so high in tech areas like the SF Bay that intelligent workers REQUIRE higher pay. Then in backwards states like Indiana, where tech workers are not respected in the least, pay is worse than factory workers and the governor prefers to outsource the state's unemployment database work to India, claiming there's no money for job training in the state budget.