ibn taymiyyah said

ولم يكن في الخروج لا مصلحة دين ولا مصلحة دنيا بل تمكن أولئك الظلمة الطغاة من سبط رسول الله صلى الله عليه وسلم حتى قتلوه مظلوما شهيدا وكان في خروجه وقتله من الفساد ما لم يكن حصل لو قعد في بلده فإن ما قصده من تحصيل الخير ودفع الشر لم يحصل منه شيء بل زاد الشر بخروجه وقتله ونقص

الخير بذلك وصار ذلك سببا لشر عظيم

there was no interest for the sake of religion or for the sake of this world in his uprising; it enabled those tyrants to do zulm on him till he was martyred; and in his uprising and his killing was such fisad which would not have been achieved had he sat in his town; for his aim was to gain betterment and remove evil; but he did not gain any rather it increased the evil due to his uprising and his murder; and it decreased the khair/betterment; and this (struggle) caused great evil

[minhaj us sunnah, ibn taymiyya; vol 4, page 264, research by mohammad rashad salim, printed by mususa qurtuba; first print; 1406]