With the advent of Islam, Mecca changed from a place of polytheistic idol worship to just a metaphorical house of God but with increased importance.
Explanation:
Before Muhammad and his disciples reached Mecca, the main place of worship in Mecca (the Kaaba) was a place where there were many idols of Gods and Goddesses that were being worshiped by the locals.
Muhammad marched to remove these idols from there and to restore the original purpose of the Kaaba as directed to him by the divine voice.
Later in time, Mecca grew to become the most sacred place in the religion of Islam and developed to its zenith.