Uhhhh Daniel, seems that we´re having a small lesson in history! You´ve explained the HAPAG, then I do the Lloyd:
The name "Lloyd" originates from the company NDL, "Norddeutscher Lloyd" (NorthGerman Lloyd). As HAPAG it started in the business of sea transport, their homeport was Bremen/Bremerhaven, HAPAG´s was Hamburg.
HAPAG and NDL have always been in cut-throat competition in Germany and nearlyevery market they served. Fortunes shifted quickly between both companies, the "leader status" changed several times, however both lines remained on top of the world league.
Two unfortunate wars brought down the companies and in the early 70ties (?) both agreed on a merger. At that time the airline was founded to have a second business leg apart from the shipping (which was itself already splitted into container line, cruise line and bulk line). But it wasn´t the first time that both companies were involved in the aviation, they were the first ones to introduce "mail planes", starting from their big pax liner in the middle of the atlantic and both were active in the 20ties when there was a founding boom in Germany and many new airlines started.
In the late 90ties Hapag-Lloyd was aquired in a surprise move by Preussag which itself became a touristic and logistics group. The touristic part was mostly taken out of the Hapag-Lloyd group, integrated into Preussag/TUI.
Hope it helps... if you´ve questionsdon´t hesitate, I´ll try to answer them!