[Machine] That the Messenger of Allah ﷺ formed brotherhood among his Companions, so they began inheriting from each other because of that, until the verse was revealed: "And those with close relationship are more entitled to inheritance from one another." So they started inheriting based on kinship.
أَنَّ رَسُولَ اللهِ ﷺ آخَا بَيْنَ أَصْحَابِهِ فَجَعَلُوا يَتَوَارَثُونَ لِذَلِكَ حَتَّى نَزَلَتْ {وَأُولُو الْأَرْحَامِ بَعْضُهُمْ أَوْلَى بِبَعْضٍ} فَتَوَارَثُوا بِالنَّسَبِ