You are quoting something written in a story. Mahabharati is an Epic (story) and as mentioned below also, the incidents mentioned therein existed only in the imagtination of the author.
The Author of Mahabharata was partial to one family. As per modern civil laws, the Pandavas were not even eligible to rule to Kingdom as Pandu was ruling on behalf of his elder brother (Dritarashtra) as he was blind.
Pl do not try to justify historical truth with something written in stories.