Not such a big surprise when you consider the history of aviation, especially in Germany. The first airlines were actually called "Luftfahrt Reederei" - which would nowadays be translated as "Aviation Shipping Line". However, as the Zeppelins were around at that time, and the appropriate term is "Luftschiff " (airship, at least at that time the legal term). Now, the term "lloyd" somehow transferred over to aviation, and due to the close economic ties with South-America at that time the term "Lloyd" went over to South-America, too, and was then found in several airlines.
Actually the term "lloyd" must have originated from the "Norddeutsche Lloyd or NDL" - Hapag-Lloyd was only founded in the 1970 as the result of a merger between the HAPAG and the NDL.