"If a man dies and he has no son, his estate should go to his
daughter. If he has no daughter, his estate should be given to his
brother..." (Bemidbar 27:8-9)
It is a mitzvah to follow the Torah's guidelines in all areas of life,
The Sefer HaChinuch (mitzvah 400) explains that Hashem is in control of
the entire world. He provides people with property with the intention
that afterwards this property should be transferred to their children.
A person may not change the rules of inheritance and designate a friend
who is a nonrelative as his inheritor. These laws are called "chukas
mishpat," which means they are the decrees of Hashem (Rambam, Hilchos
Nachalos 6:1). A father is, however, permitted to give things away as
gifts (ibid., 5).