We used to garland the goats and send them (to Mecca), and Allah's Messenger (ﷺ) stayed back in Medina as a non-Muhrim ard nothing was forbidden for him (which is forbidden for a Muhrim).
Sahih Muslim Book 15, Hadith 408