The homelessness problem in the bay area is mostly caused by the extremely high housing prices, which are ultimately caused by NIMBYism; and by the stupid and self-destructive empathy of the local progressive elites who think it's oppressive to use the police to force the most dysfunctional visibly homeless people living on the streets into involuntary treatment and shelter.
Neither of these phenomena are primarily the fault of the Silicon Valley tech industry; and NIMBYism in particular is largely driven by people who bought bay area houses many decades ago (my family is from the bay area, and I'm absolutely including my relatives in my parents' generation in that number - none of them work in the tech industry).