The Shirakis of Japan chose an unusual way to save the family name from extinction several centuries ago.
This particular family had no children, yet it was still very important to them to carry on the name of Shiraki.
So they did something somewhat unorthodox, at the time. Since they had no children, they arranged for a marriage between a second family with only a daughter and a third family with a second-born son.
In return for arranging this marriage, the families of the young couple agreed to take on and perpetuate the priests' family name of Shiraki. [Link]