Question 40: What is the reason for Hajj, and what is its purpose?
Answer: In short, Hajj in Islam the attendance at a specific time of the year, in a specific place which is the sacred house of Allah or the Kaaba. So first we must know the attribute of the time and place.
As for the place which is the Kaaba, it is but the manifestation and appearance of the Constructed House, which is the manifestation and appearance of al-Thirah , and al- Thirah is in the sixth sky which is the highest perfect heavenly sky, and following it comes the seventh sky which is absolute and not perfect. And Al-Thirah, was only created after the response of the angels to Allah when He told them of the creation of Adam , so the angels circumambulated around it so that Allah would forgive them and accept their repentance following their offense and objection upon Him .
And al-Thirah also manifested in the five skies lower than the sixth sky, so in each sky there was a house suitable for its status for the angels of that sky to circumambulate around, so that Allah swt would forgive them and accept their repentance, so in the fourth sky there was The Constructed House, and this house manifested and appeared on the earth, so it was the Sacred House of Allah or the Kaaba. Thus when Adam descended to earth, he circumambulated around it so Allah forgave him and raised his rank and status by His Favor and Generosity. 
As for the time: It is Thul-Hujjah, and the most important feature of this month is that it is the month in which Imam al-Mahdi emerges in Mecca and sends the Pure Soul to the people of Mecca and they kill him between the Corner and the Station, so he pbuh rises after that on the tenth of Muharram. Therefore, the house of Allah was placed in the skies for the angels to circumambulate around it and ask for forgiveness after their objection to the Proof of Allah Adam. And it was placed on the earth for Adam to circumambulate around it after his transgression over the tree of the knowledge of the progeny of Muhammad or the tree of the allegiance.
(and We did not find him to be of intense ability) : Meaning to tolerate the allegiance to the progeny of Muhammad, and they are the Proof of Allah upon Adam pbuh, so the circumambulation around the house is but to acknowledge the proof of Allah upon the creation by the allegiance, and obeying his commands and obeying him.
So the reason for Hajj is to ask forgiveness for the shortcoming regarding the right of the Proof upon the creation in every era, and in our era he is Imam al-Mahdi . And it has been narrated from them pbut in the meaning of “Allah made Hajj only for the people to present their allegiance to us”. 
As for the purpose of Hajj, it is the gathering in this place and and in this time of every year in anticipation of the rise of the Awaiting Reformer al-Mahdi to perform Jihad between his hands, as he is the possessor of the Athan  in our era, Allah said in the Quran, ‘They come to you O My proof upon My creation, not to Me.’ The Almighty said,
((“And proclaim to the people the Hajj [pilgrimage]; they will come to you on foot and on every lean camel; they will come from every distant pass -“)) 
((“Then let them end their untidiness and fulfill their vows and circumambulate around the House of Redemption.””)) 
And ending the untidiness means cleansing and purification, and by the appearances, it is cutting the nails and shaving the head, as is according to the pulp and the truth, what is meant by it is meeting Imam al-Hujja , and shaving the head represents detachment from all ideas and submission to the Proof pbuh and obedience to his commands.
And it was only called the House of Redemption because whoever circumambulates it is redeemed from the guilt of his shortcoming with Imam al-Mahdi , the Proof upon the creation ((“That And whoever glorifies the sanctities of Allah, it is best for him”)) , ((“That [is so]. And whoever glorifies the rites of Allah, indeed, it is from the piety of the hearts.”))  As the sanctities of Allah and the rites of Allah are the proofs of Allah upon the creation.
The Allegories – volume 2
 Narrated from Abi Abdullah PBUH that he said ” … As for the commencement of this house, Allah Almighty said to the angels: “Verily, I am making a successor (Khalifa) on earth” [Quran 2:30] and the angels replied to Allah Almighty and said: “Will you place therein who shall make mischief in it and shed blood” [Quran 2:30] So He left them and they saw that this was from His indignation and sought refuge to His throne, He then ordered one of the angels to make for Him a house in the sixth sky to be called Al-Thirah confronted with His throne, so He rendered it for the people of the sky to which seventy thousand of the angels circumambulate around it with no return and ask for forgiveness. Then when Adam descended to the sky of the Dunya, He ordered him to mend this house confronted with that, so He rendered it for Adam and his progeny just as it was mended for the people of the skies” Al-Kafi: Volume4 Page187, The chapter of the commencement of the house and Tawaf
 Narrated from Abi Hamza Al-Thamali from Ali the son of Al-Hussain pbuh he said “I said to my father: why did Tawaaf become seven rounds? He said: Because Allah The blessed Almighty said to the angels “Verily, I am making a successor (Khalifa) on earth” and the angels replied to Allah Almighty and said: “Will you place therein who shall make mischief in it and shed blood”, Allah said “I know what you do not know” [Quran 2:30] and he never used to obscure them from his light, but he did for seven thousand years, so they sought refuge to the throne for seven thousand years, for Allah was merciful on them and accepted their repentance and made Al-Bayt Al-Mammor in the fourth sky for them and made it a reference and a safe house, and placed the sacred house beneath Al- Bayt Al-Mammor and made it a reference for the people and a safe house, so Tawaf became seven rounds as an obligation to all the slaves, a round for every thousand years” The legislation of Islam: Volume2 Page406-407 Chapter143 Hadeeth1
 Quran 20:115
 Al-Kafi Volume1 Page392 Chapter “The obligation upon the people following their rituals is to approach the Imam and ask him about the knowledge of their religion and present them with their welaya and love” Hadeeth 1, 2, and 3].
 Al-Athan: Proclamation to prayer- Trans.
 Quran 22:27
 Quran 22:29
 Quran 22:30
 Quran 22:32