The eminent scholar Sheikh Ata Bin Khalil Abu Rashtah explains in his Tafseer of Surat al-Baqarah verse 189 – 190 that the following are understood:
After Allah mentioned Hajj in verse 189 He then mentioned issues of Jihad in verse 190 then he repeated on Hajj. Allah Ta’ala has attached Hajj with Jihad in numerous verses of the Quran.
After mentioning Jihad in verse 184 He followed it with Hajj and Umrah in verse 158 of Surat al-Baqarah. And after mentioning about Hajj from verse 26 of Surat al-Hajj after that came the Qitaal verses from verse 38 to 41 as if the hardship and difficulty found in the Hajj journey and that in the Jihad explains the wisdom behind the synonymous mentioning of Jihad and Hajj.
And as if the forgiveness that is in the accepted Hajj and martyrdom in the way of Allah explains the big relationship that exist between Hajj and Jihad.
Then when the mother of believers ‘Aisha (ra) asked the Messenger (saw) about non obligation of Jihad to women, the Messenger (saw) said:
عليكنن جهاد لا قتال فيه الحج والعمرة
The Jihad that has no fighting (Qitaal) upon you is Hajj na Umrah.
And when the Messenger (saw) performed Hajj in the 10th Year Hijri (the farewell pilgrimage) after the Messenger completing it and demonstrated to Muslims the rituals of Hajj, the fight assignment he carried out in Medina is preparation of the army of Usama to fight the Romans i.e. Jihad was among his first tasks when he returned to Medina from Hajj.
And likewise Sayyidna Abu Bakr (ra) performed Hajj in the Year 12th Hijri, when he finished and returned to Medina among his first assignments was to mobilize an army to fight the Persians and Romans then came the battle of Yarmuk in which Abu Bakr (ra) died when the battle was ongoing.
Then Khalid (ra) performed Hajj when the battle of Iraq was ongoing, and when he finished his ritual he returned and completed his Jihad.
And Sayyidna Umar (ra) performed Hajj in the Year 14th Hiri and in his Hajj he mobilized Muslims to fight the Persians.
And likewise it was for some of the righteous Caliphs, where they would fight one year and perform Hajj the other as if between Jihad and Hajj there existed a relationship and correlation.
This is how Hajj and Jihad is in the Book of Allah and the Sunnah of the Messenger (saw) and in the biographies of the righteous Caliphs and those who followed in goodness, their journeys to Hajj were followed by military expeditions to fight their enemies.
فَخَلَفَ مِن بَعْدِهِمْ خَلْفٌ أَضَاعُوا الصَّلَاةَ وَاتَّبَعُوا الشَّهَوَاتِ فَسَوْفَ يَلْقَوْنَ غَيّاً
Then they were followed by bad decedents who left obligatory Salah, indulged into pleasures, therefore indeed they shall be punished for their actions. [Maryam: 59]
They separated between the rules of Islam, they permitted some, that call them to spiritual worship but remained silent on the call for Khilafah and Jihad, they separated between the prayer and Khilafah, and the Hajj issue as well as the military Jihad expeditions, rather they have reached an extent of stopping Jihad, and purporting for a peaceful one.
قَاتَلَهُمُ اللَّهُ ۚ أَنَّىٰ يُؤْفَكُونَ
May Allah destroy them; how are they deluded?