Although we are told that Óðr undertook the quest to retrieve the sword for his liege, I suspect he truly did it for Víðarr and not Óðinn.
Óðr had come to reside in Ásgarðr along with the other hostages at the conclusion of the Æsir-Vanir war, and so had watched Víðarr mature from an awkward and ill-fitting teenager into a strong, clever and handsome prince of the realm. Óðr sympathized with the youth, for he felt the same growing up at the Vanic court, an adopted child of Njörðr.
It was worse for Víðarr however.
Although Óðr’s ancestry was shrouded in mist (or at least the half that was not Alfar) Víðarr’s was not – it was known by all that half of his kin were Jötnar, who were as often as not the enemies of the Æsir. Though he was the dearly loved son of the Allfather that did not stop the suspicious looks and whispered slurs he was forced to endure, and it took tremendous endurance to keep his wrath in check. All Jötnar are hot-blooded to begin with (Ice Giants included) but Víðarr was as much like his mother as his father, and Víðarr’s mother was named Gríðr, which means “frantic eagerness; greed; vehemence, violence, impetuosity“ and she was all of those things, and much more. It’s why Víðarr had come to live at Ásgarðr rather than be reared by his mother, as was customary among the Jötnar.
And so Óðr befriended Víðarr and took him under his wing, teaching him exercises to control and redirect his rage and constructive ways to give vent to it, such as reveling with the Wild Hunt. He also instructed him in ceremonies, sacrifices and sacred lore since Víðarr showed some aptitude towards priestcraft in addition to the arts of war.
Otherwise Víðarr was sullen, brooding, introspective and preferred the company of the birds and beasts of the woodlands to that of his fellow Ásgardians. He would have made a perfect German Romantic poet, which perhaps explains why Óðr grew so fond of this son of Óðinn.
And why when Óðinn relayed what the Völva had communicated to him Óðr immediately went in search of the dragon and its immense hoard, which contained a sword forged by Vǫlundr himself. If Víðarr was to battle the savage Wolf at the world’s end, he would need the proper weaponry. Óðr did not wish to see him fall, or any of the Æsir or Vanir for that matter. Hopefully with this sword none of them would.
Little did Óðr know that he had been dispatched to find the means by which Óðinn will be avenged, though Óðinn knew it.