Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) narrates that when this verse was revealed: {وَلَاتَقْرَبُوْامَالَالْیَتِیمِإِلَّابِالَّتِیہِیَأَحْسَنُ} … Do not go near the wealth of the orphan, except in a way that is better. So the people separated the wealth of the orphans, and when they separated it, their food began to spoil and the meat began to stink. When this was mentioned to the Prophet (peace be upon him), this verse was revealed: {وَإِنْتُخَالِطُوْہُمْفَإِخْوَانُکُمْوَاللّٰہُیَعْلَمُالْمُفْسِدَمِنَالْمُصْلِحِ} … If you mix with the orphans, then they are your brothers. Allah knows the corrupter from the reformer. After this command, the Companions mixed their food with theirs.
Hadith Referenceالفتح الربانی / تفسير من سورة النساء إلى سورة الأعراف / 8598
Benefits: … From the first verse, the noble Companions (radi Allahu anhum) became concerned, due to which they kept the accounts of the orphan separately. This was indeed justice and fairness, but it was causing harm to the orphan, because cooking food separately and then the leftover food going to waste would result in loss. Therefore, through the new command, Allah the Exalted guided the noble Companions (radi Allahu anhum) that they should include the orphans with themselves, but the expenses should be accounted for accurately and with justice and fairness. These verses should also serve as a lesson for those various individuals whose food and drink are shared; there should not be found in anyone’s heart any such element regarding the shared wealth that would affect the requirements of justice and fairness.