United States ship naming conventions for the U.S. Navy were established by Congressional action since at least 1862. Title Thirteen, Chapter Six of the US Code enacted that year reads in part,
“The vessels of the Navy shall be named by the Secretary of the Navy under direction of the President according to the following rule:
Sailing-vessels of the first class shall be named after the States of the Union, those of the second class after the rivers, those of the third class after the principal cities and towns and those of the fourth class as the President may direct.”
Further clarification was made by executive order of President Theodore Roosevelt in 1907. However, elements had existed since before his time. If a ship is reclassified, for example a destroyer is converted to a mine layer, it retains its original name.