It is narrated from Sayyiduna Anas (may Allah be pleased with him) that "the Prophet (peace and blessings be upon him) liked the Muhajirun and the Ansar to be close to him so that they could learn (the religion and its rulings) from him."
These are the words of the narration of Abd al-Wahhab al-Thaqafi (may Allah have mercy on him).
Yazid bin Harun (may Allah have mercy on him) gave these words in his narration: "that in the prayer the Muhajirun and the Ansar should be close to him (peace and blessings be upon him) so that they could acquire (knowledge and guidance) from him."
Related hadith on this topic