Historical reasons, mainly. When Charlemagne was crowned Emperor of the West in 799, his Empire did contain Rome. Rome itself fell within the historical region considered to be the Kingdom of Italy, or Lombardy depending, though for a good portion of the time period the Holy Roman Empire existed Rome and surrounding territories were functionally personal property of the Pope and didn't really have much to do with the Empire.
That doesn't really answer the question though. It was called the Holy Roman Empire because the title was intended to be a direct continuation of the Western Roman Empire, even if events didn't pan out that way.
The question itself has problems though. Consider, why was the Eastern Roman Empire called the Roman Empire if it was even further away from Rome? In the end, it's about giving the impression of Continuity, which the Eastern Roman Empire had a much better claim to. The city itself has nothing to do with anything.
I know it's late and many people have answered the fact that the reason for forming the HRE was political. But I also wanted to answer how Pope Leo III actually justified giving the title "King of the Romans" without the authority to do so.
Pope Leo III invented a documented known as "The Donation of Constantine." This spurious document made the claim that Constantine "diplomatically retired to the province of Byzantium" and left his crown for the pope for him to bestow upon anyone as temporal 'King of the Romans.' The 'Roman' in 'Holy Roman Empire' is essentially fraudulent in it's claims.
Norwich, John Julius. "Iconoclasm." A Short History of Byzantium. London: Penguin, 1998. 119. Print.
Can anyone confirm what I learned in school? I learned that in the bible it says that when the roman empire falls, the earth will go down (or something like that). So the people didnt want that to happen and "extended" the empire.
The eastern Roman Empire did not contain Rome in any sense since 800 AD but its monarchs were the successors of the earlier Roman emperors back to Caesar Augustus the founder of the empire. So they used the title of Basileus kai Autokrator ton Rhomaion, King and Emperor of the Romans, for centuries until 1453.
In the 700s the popes had chosen the Kings of the Franks to be their protectors since the distant emperors in the east were too busy fighting Arab invaders to protect Rome very well. In 797 Emperor Constantine VI was deposed by his mother Irene who then ruled the Empire until being deposed by Nikephoros I in 802. The ambitious conqueror (but theoretical subject of the distant emperor) Charlemagne, king of the Franks and of the Lombards, and the pope decided that Irene was an illegitimate ruler as a usurper and a woman and that made a good opportunity for their political advancement. So Charlemagne was crowned Emperor in 800.
From the start the Carolingian emperors and the popes had different ideas. The emperors considered Rome and the Papal States part of their realm while the popes wanted the Papal States to be an independent realm.
To make a long story short, after centuries of on again and off again conflict and negotiations, by the start of the modern diplomatic system about 1500 AD the Papal States were recognized as an independent realm.
But the Holy Roman Empire was still called the Holy Roman Empire because the Emperors (with the title of Romanorum Imperator et Semper Augustus - Emperor of the Romans and Always Emperor/Imperial) were the successors of Otto I The Great, the first emperor for several decades in 962 AD, and before that of the Carolingian emperors back to Charlemagne in 800 AD, and before him of Constantine VI (reigned 780-797) and the eastern Roman or "Byzantine" emperors back to Arcadius following the division of the empire in 395 AD, and before him of the Roman emperors back to Caesar Augustus the founder.
So it was the Holy Roman Empire since it claimed to be the (much changed) empire founded by the Romans.