Keep in mind that NYC doesn't actually have much of a choice - there's a "right to shelter" here which requires the city to provide these migrants a safe place to stay. If they city doesn't, it's going to be in clear violation of the law. The mayor wants to suspend this policy but my understanding is that that effort is currently mired in court.
Then, aside from the legal requirements, there's the simple fact that the migrants are already in the city. Maybe not having a right to shelter policy in the past would have dissuaded them from coming, but it's too late for that. I don't think it would be decent to leave them exposed to a winter storm, even if that means motivating more to arrive.
Ultimately this is an issue the federal government will have to deal with. Cities can't address the root cause of it. IMO the people of the entire USA (or rather their representatives) should established a federal program for either sheltering and integrating migrants or keeping them out. Letting them in and leaving state and local governments to deal with them is a dereliction of federal authority, whether those state and local governments are in Texas or in New York.