But both New York City and New York State are places. When someone just says "New York," going by which place had that name first is a reasonable way of resolving the ambiguity.
Also: "York" is a city in England. It should be apparent that "New York" also refers to a city. "New York State" is the state in which the city of "New York" happens to be.