There are two reasons that I can think of. Firstly, and perhaps most importantly, New York is of course the financial capital of the United States, and therefore a very appropriate place for Miller to set his play which is all about capitalism, the rat race and trying to achieve the nebulous American Dream. By setting his play in New York, Miller makes Willy's misery that more acute because he is constantly surrounded by the mantras of capitalism and continually seduced by the phantoms of success. Biff, too, is seduced by those same voices for part of the play, until he has his epiphany and realises that he was never meant for a job in the city.
The second reason is the way that the encroaching city is shown to symbolise Willy's true desire or calling to live away from the city and in the countryside. Remember when they first bought their house it was in the countryside, but steadily and surely, as the city developed, their house was overtaken and now they are unable even to grow anything in the back yard because of the buildings surrounding them blocking out the sunlight. Willy says to Linda at the beginning of Act II:
You wait, kid, before it's all over we're gonna get a place out in the country, and I'll raise some vegetables, a couple of chickens...
We realise more and more as we watch this play that Willy's life has been futile, and he and his whole family would have been much happier had they lived in the countryside and Willy had got a job as a handyman or a carpenter. As Biff says in the Requiem, there was more of his father in the front stoop of the house than there ever was in the sales he made.