Actually there isn't much government stuff here — you see that more around the DC area. Also if you think of the fact that a company like Google depends on ad revenue or that Apple is so focused on the the consumer space the fact that NYC is a media center can be a very good thing. Also while the city doesn't have a recent history with tech hardware if you look at IBM or AT&T they all grew up in the tri-state area.
> if you think of the fact that a company like Google depends on ad revenue
Google's ad platform was the result of combining Applied Semantics' ad matching algorithm with DoubleClick's penetration/established partner network. In other words, the engineers in the Bay needed a way to pay for their sweet search engine development and just bought ad companies in LA and NYC respectively :)