Ilium is the Latin form of the Greek Ilion or Ilios. The name comes from Ilos, which is the name of a few figures from mythology. The Ilos who built the city of Ilios, Ilion was the son of the king of the region Tros. (Tros was also the father of Ganymedes, the youth carried off by Zeus and placed in the sky as the “water bearer” Aquarius). When Ilios became the capital of the region known as the Troad (Troas/Troada in Greek) the area ruled over by Tros the city became known as “Troia.” (In both Greek and Latin the -ia ending for impersonal feminine nouns is very common and often shows up in concepts such as “sophia” “wisdom” in Greek or “discordia” “discord” in Latin, or in the names of places such as Italia, Thessalia, Makedonia similar to how “land” is used in Germanic place names, or “stan” in many central Asian languages)
Ancient cities usually had their names traced to a mythological ancestor—or several. While Athens, Rome and Thessaloniki are well attested (the goddess Athena, Romulus the founder of the city, and Thessaloniki, the younger sister of Alexander the Great, whose husband founded the city and named it after her) others, like Troy and Sparta often have layers of names and founders. Troy/Ilion is traced to Tros and Ilos, while Sparta, also called Lakedaimon (after the region of Lakedaimonia it was the capital of) and Lakonia (hence “laconic”) all of which were traced to supposed legendary founders and ancestors.
Quora, an answer by Niko Vasileas, B.A. Sociology & History, Our Lady Of The Elms (2018) to the question "Why was Troy also called Ilium?".