The Messenger of Allah ﷺ loved for the Muhajirun and the Ansar to be close to him so they could learn from him.
كان رسول الله ﷺ يحب أن يليه المهاجرون والأنصار ليأخذوا عنه.
Ibn Majah narrated it (977), saying, Nasr bin Ali Jahdami told us, saying, Abdul-Wahhab told us, saying, Humayd told us, from Anas, and he related the hadith. Tirmidhi mentioned it (1/442) as a suspended report, and in it, "so that they might memorize from him." Busiri said in Zawaid (1/192), "This chain has trustworthy narrators."Hakim narrated it in Mustadrak (1/218) from Abu Bakr bin Ishaq, from Abu Muthanna, from Musaddad, from Yazid bin Zuray, from Humayd, with the same chain and wording, and he said, "This is a sahih hadith meeting the criteria of the two Shaykhs (Bukhari and Muslim)."Imam Ahmad narrated it in his Musnad (11963) from Mutamir (who is Ibn Sulayman), from Humayd, with the same wording, and in it, "He likes the migrants and the helpers to be next to him in prayer."