The Messenger of Allah ﷺ loved for the Muhajirun and the Ansar to be close to him so they could learn from him.
حدثنا نصر بن علي الجهضمي حدثنا عبد الوهاب حدثنا حميد
كان رسول الله ﷺ يحب أن يليه المهاجرون والأنصار ليأخذوا عنه
[Its chain is sahih] Abu Yaala reported it, no. 3816, from Abdul-Wahhab Thaqafi with this chain. Ibn Hibban graded it sahih in Mawarid, no. 87, as did Hakim, 10/218, and Dhahabi. Humayd Tawil stated clearly that he heard it directly, as recorded by Bayhaqi, 3/97. The hadith has many corroborating narrations.