San Francisco rents are worse. Five years ago, SF was a better deal.
Also, if you're a decent programmer in NYC, you'll make 20% more than your counterpart in SF. The downside is that NYC finance jobs don't involve equity packages. The upside is that there are bonuses (wildly variable) and there's much more of a career track. Finance companies care more about their peoples' careers than Bay Area tech companies, and that's a big part of why the techies end up answering to finance in the end.