If you watched carefully, luna's dad was narrating the fairytales of "Beadle the Bard" and one of them was about the "The tale of the 3 Brothers"
"The Tale of the Three Brothers"
The story is about three brothers who, travelling together, reach an impassable river. They make a magical bridge over the river. Halfway across the bridge, they meet the personification of Death who is angry for losing three potential victims. He pretends to be impressed by them and grants each a wish as a reward. The eldest brother asks for an unbeatable duelling wand. The middle brother asks for the ability to resurrect the dead. The youngest brother doesn't trust Death and asks for a way to stop Death from following him. Death gives him his cloak of invisibility. Afterwards, the brothers go their separate ways.
The eldest brother, bragging about his powerful wand, is robbed of it and murdered while he is asleep. The middle brother uses his ability to bring back the woman he loved, who died before he could marry her. However, she is not fully alive and is full of sorrow. He kills himself to join her. As for the youngest brother, Death never manages to find him, as he stays hidden under his cloak. Many years later, the brother removes his cloak and gives it to his son. Pleased with his achievements, he greets Death as an old friend and chooses to leave with him as an equal.
Basically the elder wand is thought to be the most powerful, and can only be won through a wizarding duel. Dumbledore was the owner of it, and Voldermort's went into his graves to get it. Only to realise that Malfoy was the true owner of it as he disarmed dumbledore in the sixth book before he dies....