Between WW1 and WW2 (and before) the naming convention was:
Battleships - states
Battle Cruisers (none finished as such) - Revolutionary war battles and famous historic USN ships
Cruisers - Cities
Destroyers - Distinguish naval heroes and sailors/officers who had died in battle
Submarines - Fish and sea creatures
Before and in WW2:
Aircraft Carriers (CVs and CVLs) took on the Battle Cruiser convention and extended it to include battles from other wars
Destroyer Escorts followed the convention for Destroyers
After:
Though there was USS Forrestal, the USS John F. Kennedy started the convention of naming carriers after leaders and Presidents.
Early ballistic missile submarines were named after heroes, but that changed with the Ohio class; not sure if there is a new class of boomers in the works.
Early nuclear attack submarines continued the fishy naming convention, but the switched to cities, and now to states.