so as far as I can tell, way back when SF was still a cool viable place to live it became a tech mecca for the following reasons: 1) the close links between the universities and the military industrial complex meant a lot of real engineering talent moved out there and stuck around to work in 2) companies that still did actual research; 3) affordable housing was available with garages for workshops both inside SF and in all the surrounding areas; 4) psychedelic drugs and a general outsider, artistic, borderline anti-capitalist vibe.
NYC has none of this. It is a dead city ruled by finance and real estate psychos.
And in fact SF has none of this anymore (there have been some efforts to bring the drugs but it is not the most important leg of the chair). There aren't engineers, there are startup-brain business school types masquerading as engineers, dreaming of getting rich by doing things that make the world worse and flipping it to retail investors in an IPO or a buyout or just a straight scam. There is no longer anywhere to live that gives the young and weird space to work on idiosyncratic projects that could turn into something. And big companies don't do blue-sky research, they try to buy up innovation when it happens, which it essentially no longer does.