Why does every major bad guy end up being a good guy later? It feels like the common thread is "I'm a major bad guy in Naruto, I lose/die, then I have a change of heart and want to help Naruto once bigger baddy shows up". When does a bad guy remain a bad guy? (e.g. - Zabuza, Gaara, Itachi, Nagato, Orochimaru, Kabuto, Sasuke, Obito, and the demon fox who was supposed to be the incarnation of the world's Malice/Hatred). 

Even Madara seems poised now for a return as a good guy since there's a bigger threat and he originally had good intentions when he was a kid.  

Is there a reason for this? Why aren't the bad guys more angry that they lost, and join up with new bad guy? Seems like they give up really easily and have no commitment to their goals.
Maybe because there actually isn't any "bad guy" in this world from the start. Somebody becomes bad because of certain incidents happened to them in the past. Nobody is evil at the time when they are just born in this world.

If you cut the fillers and the battles in the Naruto or Naruto Shippuden, you will see the story of this anime actually is very deep, closely related to our everyday life. It always tries to unify people in some way.

You will surely remember how Nagato ended the chain of hatred, or how Zabuza kept his faith on Naruto. You will see there is no actual "villain" in Naruto. Every "villain" character (Madara, Sasuke, Obito, ...) has a good reason to behave like how they do.
When someone tries to do things the way they want, but couldn't make it, they try to help those who have the same goal like him/her. That's how they become good.

It's actually like how Sossli1 says in one of his videos on YouTube

"Those in need of a shoulder to cry on seek those who experienced it".