It was writing advice I got at a conference once. People are selfish. It's true. Even the most seemingly selfless people are receiving a personal reward for their selfless deeds. People donate money for a tax break, or to make-up for some bad karma, or because they like the feeling they get when they help people less fortunate. No one does something for nothing, which is something you need to fulfill in your characters if you want to keep them out of the "Mary Sue" trap.
Motivation is what makes a story. Let's look at Hunger Games. There are a multitude of reasons why Katniss could volunteer to compete. She could have been a thrill-seeker, or could have volunteered so she could get into the Capitol and enact her own plot for revenge, or she could have been in it for the money. I doubt any of these reasons would make us like Katniss the way we do, but even volunteering for her sister is because of her personal wants. She can't sit back and watch her sister die. She would rather sacrifice herself than lose another beloved family member.
From there on out, the reasons for her actions are very clear. She wants to ensure her survival so she can go back to her sister. Even partnering with Rue serves a purpose to Katniss. She needs help to destroy the others' food supplies, and Rue reminds her of her little sister, Prim. She offers Katniss comfort in an unfamiliar place.
The major plot of the novel isn't getting revenge against the Capitol. It's Katniss struggling with her own wants. She wants to survive, to get back to her family. But she doesn't want to sacrifice all of her morals to do it. Two selfish wants butting heads gives us the drama that made this a best-seller.
In your own writing, stop at pivotal points and ask yourself, "Why is my character doing this?" If the answer is that you're forcing him to do it, or you need him to do it for the sake of the plot, you have to do much, much better than that. Even with your secondary characters. Why does Peeta join forces with the Ones and Twos? Because he wants to protect Katniss. Because he loves her.
Need help? Try writing a scene from one of your secondary character's point of view? How different would the Hunger Games be if Peeta had told the story? Or Prim? Or Gale?