Flags of convenience

can anyone explain to me the phrase FLAGS OF CONVENIENCE is it for tax purposes and/or advantageous for maritime law