NYC is a very, very good city to live in if you know how to take advantage of it. Others in the comments have already said why: arts, culture, entertainment, nightlife, and the sheer culture of the city. If you know how to unlock it, the city can do nearly anything you want. It's also (surprisingly) a nice city to bike around these days, and has some of the best regional rail in the country for local traveling. New York itself is a beautiful and (IMO) somewhat underappreciated state, and it's easy to get to much of the state from the city. It's also much more than just Manhattan and (nowadays) Brooklyn: the Bronx, Queens, and (even!) Staten Island are critical to the city's identity and culture, and are often overlooked by transplants.
That being said, it's not for everyone. You have to be okay, mentally, with a certain amount of mishegaas. You have to be okay with garbage and the fact that the city reeks in the summer, and you have to internalize the fact that garbage and homeless people existing aren't the same thing as crime. If you're a programmer, you'll also have to internalize that New York cares much less about technology: we're a finance and arts city; if you meet people at bars here, there's a very good chance they won't want to hear about tech or startups, &c &c.
(Separately: you shouldn't be paying anywhere near $5k for the average 1BR, even in a "high-end" neighborhood like the UES. Most convenient neighborhoods in Brooklyn should be around $2.5-$3k for a 1BR in the current market, which is already obscene. For "cool" neighborhoods in Manhattan, I would expect around the same.)