Whenever the Messenger of Allah ﷺ set out on a journey, he would draw lots among his wives. The lot fell to Ayesha and Hafsa, so they both went out with him. The hadith continues.
كان رسول الله ﷺ إذا خرج أقرع بين نسائه فطارت القرعة على عائشة وحفصة، فخرجتا جميعا. الحديث.
Bukhari narrated it in the Book of Marriage (5211), and Muslim in the Book of the Virtues of the Companions (2445), both from Abu Naeem, who said, "Abdul-Wahid bin Ayman narrated to us, Ibn Abu Mulayka narrated to me, from Qasim bin Muhammad, from Ayesha," and he mentioned it.