These are two separate incidents. Both of them did it to capture Hijaaz. Hijaaz was the most important place to capture to establish your Rule in the hearts of the Muslims. Whoever controls Haramain, he gets automatic respect from the whole Ummah. Please read: Chiraagh e Muhammad: Biography of Hazrat Sheikh ul Islam, written by Maulana Zahid Al-Hussaini [RA] (Khailfah and Student of Hazrat Hussain Ahmed Madni Rahimahullah Ta'ala) Also read the Biography of hazrat Sheikh ul Hind (RA), I forgot the name.