It's also not that as expensive in Manhattan as you suggest. I looked earlier this year, east village studios might run from $2000-2500. Half that for a 2bhk in Bed Stuy.
NYC has a huge problem with exclusionary zoning, but it's not quite as crazy as SF yet.
[edit: I was wrong on Astoria, my info is apparently a year out of date.]