When we started building up a large navy in the late 1800s state names were used for armored cruisers and one class of monitors, but by the early 1900s construction was outstripping the number of states, so ships started being renamed in order to reserve state names for battleships. The first to be renamed was the old ship-of-the-line New Hampshire, still in service as a receiving ship in 1904, followed by the Great Lakes patrol ship Michigan (1843). Their new names were Granite State and Wolverine, but then
the practice became to rename a ship for a city within the state; for example the old battleship Texas became San Jacinto.
Armored cruiser new York commemorated the state, and I suppose they could have "renamed" her for the city
but
she became Saratoga - and then Rochester when Saratoga was wanted for a new ship.
The name shortage also meant that some of our most powerful battleships of the era were named for the newest states, like Arizona and New Mexico.