The Messenger of Allah ﷺ was never given a choice between two matters except that he chose the easier of the two, as long as it was not sinful. If it was sinful, he would be the furthest of people from it. The Messenger of Allah ﷺ never took revenge for his own sake, but if the sanctity of Allah was violated, he would take revenge for the sake of Allah.
ما خير رسول الله ﷺ بين أمرين إلا أخذ أيسرهما ما لم يكن إثما، فإن كان إثما كان أبعد الناس منه، وما انتقم رسول الله ﷺ لنفسه إلا أن تنتهك حرمة الله عز وجل.
Malik narrated it in Husn al-Khuluq (2) from Ibn Shihab, from Urwa, from Ayesha, who said, then he mentioned it. Bukhari also narrated it in al-Manaqib (3560), and Muslim in al-Fadail (77:2327), both of them through the route of Malik, with the same wording.