The day of Bu'ath (i.e. Day of fighting between the two tribes of the Ansar, the Aus and Khazraj) was brought about by Allah for the good of His Apostle so that when Messenger of Allah ﷺ reached (Medina), the tribes of Medina had already divided and their chiefs had been killed and wounded. So Allah had brought about the battle for the good of H is Apostle in order that they (i.e. the Ansar) might embrace Islam.
كَانَ يَوْمُ بُعَاثَ يَوْمًا قَدَّمَهُ اللَّهُ لِرَسُولِهِ ﷺ فَقَدِمَ رَسُولُ اللَّهِ ﷺ وَقَدِ افْتَرَقَ مَلَؤُهُمْ وَقُتِلَتْ سَرَوَاتُهُمْ وَجُرِّحُوا فَقَدَّمَهُ اللَّهُ لِرَسُولِهِ ﷺ فِي دُخُولِهِمْ فِي الإِسْلاَمِ