There's a network effect. People want to live in a place where they have plenty of options if their current job doesn't work out. Employers want to have a large pool of local talent to draw from. This is all self-reinforcing and probably the reason why companies start and stay in the SF bay area even though the cost of living is insane.