The Hijaz campaign served multiple distinct aims beyond obeying the Sultan.

Evidence

In dealing with the different campaigns that Mehmed Ali engaged in individually rather than as episodes that could fit in a grand strategy most historians acknowledge the fact that every one of these campaigns was dictated by unique historical causes. The Hijaz campaign, for example, besides being a response to the Sultan’s order to subdue the Wahhabi rebellion, is seen as serving a number of the Pasha’s own aims. Among these were the desire to get rid of the turbulent and undisciplined mamluk and Albanian troops in his army, the hope to get Syria as a reward for helping the Sultan in his war against the Wahhabi rebels, and the desire to win fame and prestige in the Muslim world for capturing the holy cities of Islam from the rebellious Wahhabis who were seen in Istanbul as heretics and whose rising power in Arabia had allegedly caused the annual pilgrimage to cease. — Khaled Fahmy, All the Pasha_s Men_ Mehmed Ali, his…, 192