According to the Qur'an [Q 2:127], the Ka'bah was constructed by Abraham and his son, to be a place where God ONLY would be worshiped. Although the Qur'anic description of its origins may be disputed by various critics of Islam, all hands agree that the ancient site has always been seen as a place of prayer, amnesty and security. It was deemed a respected site even by the polytheists.[Ft.1].
Function as focal point of prayer direction [Qiblah]
It is worth mentioning that the Qiblah for the early followers of the Prophet Muhammad, upon whom be peace, was not the Ka'bah, rather, it was Jerusalem. We are told that Jerusalem was the first Qiblah for about seventeen months.[ Ft.2]
There are two main reasons for this that should be highlighted.  Jerusalem can be said to be a center of monotheism. Many of the prophets and teachers known to the world have a direct or indirect connection to this place of peace. Certainly, Jerusalem has many sites deemed sacred to both Jewish and Christian traditions.  Tradition tells us that the Prophet Muhammad embarked upon a spiritual journey from a spot in Jerusalem and onto the heavens. [Ft.3]
As we know, eventually the command came forth informing the Muslims that Makkah, specifically the site of the Ka'bah, should be the Qiblah.
"So, wheresoever you are, turn your faces towards the sacred Mosque [Al-Masjid Al-Haram, the site of the Ka'bah].." [ 2:144].
There is a concept of Qiblah present in Jewish tradition. They face Jerusalem, offering prayers three times daily. The idea behind the main function of Qiblah also finds an eloquent speaker in the writer of the Psalms, who asserts:
But I, by your great mercy, will come into your house, in reverence will I bow down towards your Holy Temple. [Psalms, 5:7, NIV]
For Muslims, to face One direction in prayer, this action serves as a point of unity. The same can be rightfully asserted regarding the prayer format, which is the same across the Muslim community worldwide. [Ft.4]
It should be noted that to Muslims, the Ka'bah, although sacred, does not hold any magical powers. It is merely a symbol. The Qur'an itself tells us "So, worship the Lord of this house" [Q 106:3]. It would be a misreading to assert that the Ka'bah was an idol worshiped by Muslims. Indeed, the black cover [Kiswa] has the above mentioned verse written on it. At Makkah, the visitors are praying, invoking God alone, whom they recognize as the one who has created and maintains the universe.
The Hajj is considered the last of Islam's five pillars. Its observance is conditional on the person's physical and financial abilities. The pilgrimage re enacts many of the actions of Abraham, the patriarch. It includes invoking God while circling the symbol. During the pilgrimage season, one sees every profession, class rank, nation and color represented. All are made equal by the donning of the white seamless cloth [Ihraam]. It has the potential to serve as an annual conference on world affairs, where the leaders and public alike can mingle and gain better perspective.
 In the days of Prophet Muhammad, Sall Allahu 'alayhi wa sallam, the Makkan polytheists had corrupted the Hajj practices, and this even extended to the Ka'bah itself. over 300 idols were said to have been placed and venerated at the Masjid Al-Haram.
 This is the figure given by Ibn Katheer. See Tafseer Al-Qur'aan al 'Adheem, volume 2, pg 30-33, Aleppo
 The Prophet's journey is known as the Israa'. It is briefly mentioned in the Qur'an [17:1], but a more detailed explanation can be found in the Hadeeth literature. For which see Saheeh Al-Bukhari, 8:1, 228, pg 156. Riyadh edition. Also of interest is a discussion which can be found in Muhammad Asad's Qur'an commentary [The message of the Qur'an, Gibralter, 1980].
 Different schools and sects exist among Muslims, but in general the prayer format is the same, showing another example of unity. The prayer format includes selections from the Qur'an, in particular the first chapter.