It's the city of New York that is divided into boroughs. In 1898, the modern city of New York was formed by merging the County of New York (modern day Manhattan and the Bronx), the then independent city of Brooklyn, Richmond County, and the western parts of then Queens County (the remainder is modern day Nassau County). To make people happy, the new city was divided into boroughs (similar to London). The original city of New York became Manhattan (named after the island it is on). The remainder of New York County became The Bronx. Brooklyn stayed Brooklyn. Queens County is also Queens. And Richmond County became Staten Island (also named after the island it is on).