Had God willed, He could have made them one community. But He redeems into His mercy whomever He wills. As for the transgressors, they have no master, nor a helper.
وَلَو شاءَ اللَّهُ لَجَعَلَهُم أُمَّةً وٰحِدَةً وَلٰكِن يُدخِلُ مَن يَشاءُ فى رَحمَتِهِ وَالظّٰلِمونَ ما لَهُم مِن وَلِىٍّ وَلا نَصيرٍ
wa law shaaa’al laahu laja’alahum ummatanw waahi datanw walaakiny yudkhilumany yashaaa’u fee rahmatih; waz zaalimoona maa lahum minw waliyyinw wa laa naseer