All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Muhammad and upon all of his family and companions.
The Inheritance system stated in Islamic law is a legislative miracle, as it is mentioned in the Holy Quran, due to the fact that the inheritance is distributed equally and taking into consideration parents, spouses, children, brothers, sisters and others, such as male's blood relatives classified in accordance with their degree of kinship.
As for the countries that don't observe the system mentioned above, they have unleash the one who have the legacy (The inheritee) , in which he might give the person who doesn't deserve a portion and deprive the one who is eligible to inherit; thusly, this might lead people to act weirdly or in a disgraceful manner.
In addition, Islamic Sharia kept in mind other considerations beyond the boundaries of the heirs themselves, whereas the inheritee, who possesses a legacy, is permitted to bequeath one-third of it to anyone other than the heirs by making a donation as a charity to win Allah's satisfaction or for some friends; however, raising donations' percentage for more than one-third is impermissible save after having the consent of the heirs. And Allah Knows Best.