Board Thread:Naruto Discussions/@comment-26006790-20140725193452/@comment-24519434-20140727065304

Ten Tailed Fox wrote:

Gaara seems pretty mellow ever since mid-Part I. Not one psychotic thought since. Gaara is what Sasuke could be if he'd stop thinking about himself for five seconds and realize, "Hey, other people exist around here, and they don't orbit around me!"

So fighting Kaguya, Madara, Obito and the Jūbi wasn't to help anyone else. after he got his rinnegan he could have let IT take everyone and make a deal with Madara.