Ships fly a flag of convenience in order to avoid the regulatory arms of the state or transnational institutions. But here is a fascinating colonial precedent to the flag of convenience – from 1674:
Thus, when the [East India Company] committees insisted in 1674 that a new Admiralty regulation, which required all English commercial shipping to fly only the English merchant flag, should not apply to Company ships within the boundaries of its charter, they and the Admiralty under Samuel Pepys [seriously?] reached a compromise: Company captains would simply switch their flag for the English “red ensign” when outside of the East Indies. The point specified for the transition, however, was not the Cape of Good Hope but St. Helena. While contemporary maps might have located the island geographically in the Atlantic or Africa, for the Court of Committees [of the East India Company] it quite clearly was situated conceptually and jurisdictionally “in India.” (Philip Stern, The Company-State: Corporate Sovereignty and the Early Modern Foundations of the British Empire in India, p. 42)
This flag of convenience mattered to the East India Company, because India was the milieu of its monopolistic corporate sovereignty.