It was all justified by someone who goes by name Krishna in ancient text. Krishna origin is questionable as he's not one person throughout his history but fusion of multiple personalities which existed in past.
Krishna could as well be a master manipulator who convinced other's that God and him are actually just one. Many Kings of that time actually did try to become God the prime example was Pondrak who believed he's the real Vasudev. His version couldn't survive because he lost the battle against Krishna.
Mahabharata is not useful to for an average person, reading it will not enlighten you or anything. It's not a guide on how to live your life, it has many flaws, questionable ethics and morality defined in the text, bringing God into it to make beyond contest.
If it had anything of use, India where this religious text is most popular would be epicenter of good behavior, technological advancements, ethics and morality. Is it? No it's far away from it.
Before anyone questions my religion, I am Hindu from north India (Uttarakhand Purohit clan to be specific)