In the Iliad it's a holy city because it was founded by the Gods. More important than that however, was its walls were built by the gods, and those walls were guarded by holy guards. Troy's walls in the Iliad were built by the gods Poseidon and Apollo. They are said to be Divine as a way of demonstrating in the story that the walls are absolutely undoubtedly impenetrable by mortal man. Built by the Gods, one of only two city walls said to be unbreakable with Troy's walls being the better of the two impressive specimen of walls because their walls were not only unbreakable but blessed by the gods too. The finest walls in antiquity stamped so by the Gods themselves. The Gods look at those walls and felt pride.
Plot and Point of View in the Iliad
Of coarse, Troy is a holy city with sacred walls, one of only two cities in the Iliad whose walls are so designated. ( The other is Boiotian Thebes[4.378]. The Achaean wall is not holy or Devine. It was built, so Poseidon complains, without proper sacrifices to the Gods( 7-450).
The guards of Troy are also called "holy", at 24.681.
In the Iliad they have Poseidon comparing the walls of the Greek invaders camp with the walls of Holy Troy. With the God noting that the very Fine Greek walls were not built with a sacrifice to the gods. Poseidon observes these Greeks think they can build walls better than the Gods.
In Greek stories, pride can be a fatal flaw. The Greek gods were jealous gods who cursed (actively abused) mortals who offended them with their arrogance.
Immediately after the Achaians complete their work, Poseidon complains to his brother, Zeus, that the new wall threatens to rival in glory the circuit(walls) that the gods themselves constructed when they made Troy a city (7.446-53):
The Gods taking pride in their work.
The fame of this wall will reach as far as the dawn spreads her light: and they will forget the wall that I and Phoibos (Apollo) labored to build for the hero Laomedon.