Meanwhile German independently had the word "hallo", which appears in writing since the 15th century, used to call for the ferry man or to call to your dogs on the hunt (meaning something like "fetch"). Then the telephone made "hello" popular in English, and suddenly the word "hallo" becomes popular as a greeting in German
We just picked the closest existing German word to take the same meaning as the English word. But at the same time, the etymologies of hallo and hello cross over at various times before the invention of the telephone (One etymology of Hello is that it derives from Halloo, a call to a ferry man)
Etymologies can be really weird at times