I don't know the rules of the road for NYC. Where I'm from though, you are supposed to take the lane. Quite frankly, it's insane not to take the lane, since people think they can pass you in their car, while staying in the same lane.
Traffic lanes are rarely wide enough for two vehicles to travel side by side with sufficient space between them.
For example, on a street with 10 foot wide lanes, a 6 foot wide car would have a margin of 2 feet on either side of it and 4 feet between it and a car in the adjacent lane. For buses that are 8.5 feet wide, they have about 0.75 feet on each side and 1.5 feet between them and another bus in an adjacent lane.
A cyclist is about 2 feet wide at a minimum. To have a 2 feet of space on each side, they need a lane that's 6 feet wide. To have 0.75 feet on each side, they need a lane that's 3.5 feet wide.
For the car and bus examples above, neither can leave enough space in the lane while they're in it for a cyclist. So the only way to safely pass one is to change lanes.