Many naval vessels have undergone retrofitting and refitting, sometimes entire classes at once. For instance, the New Threat Upgrade program of the US Navy saw many vessels retrofitted for improved anti-air capability. Naval vessels are often retrofit for one of three reasons: to incorporate new technology, to compensate for performance gaps or weaknesses in design, or to change the ship's classification.
Militaries of the world are often ardent adopters of the latest technology, and many technological advances have been spurred by warfare, especially in fields such as radar and radio communications. Because of this, and the significant investment that a ship hull represents, it is common for retrofitting to be performed whenever new systems are developed. This may be as small as replacing one type of radio with another, or replacing out-dated cryptography equipment with more secure methods of communication, or as major as replacing entire guns and turrets, adding armor plate, or new propulsion systems.
Other ships are retrofit to compensate for weaknesses perceived in their operational capabilities. This was the secondary purpose of the US Navy's New Threat Upgrade program, for instance. Major changes in doctrine or the art of warfare also necessitate changes, such as the anti-aircraft upgrades performed on many World War Two-era vessels as air power became a dominant part of naval strategy and tactics.
Additionally, because of the investment a hull represents, few navies scrap front-line warships. Many times smaller ships are retrofitted for patrol, coast guard, or specialized roles when they are no longer fit for duty as part of a warfleet. The Japanese Momi class from the interwar period, for example, was converted from destroyers to patrol boats in 1939, as they were no longer capable enough to serve in the role of destroyer. Other times classes are retrofit because they are no longer needed in warfare, due to changes in tactics. For instance, the  was an aircraft carrier converted from a collier (coal-carrying ship to supply coal-fired steamships with fuel) of the Jupiter-class.
Because of the heavy use of retrofitting and refitting, fictional navies also include the concept. As an example, in the Star Trek MMORPG Star Trek Online players can purchase retrofitted ships of famous Star Trek ship classes, such as those crewed by the protagonists of the Star Trek TV series. This is done to allow players to pilot iconic ships from old series of the show, that wouldn't naturally be latest-and-greatest ships due to their obsolescence or size, but are retrofitted to be suitable for a maximum-level player-character admiral.