One thing that's been said before, and it's something I heartily believe in, is that the real point of an RPG is for everyone to have fun. Now, in some situations where people were "just doing what their character would do," I've watched them do things that were very much against this idea. They were either direct actions against other players (though that's rare) or usually actions that forced everyone else in the group to conform to what they want to do. Predictably, such actions are almost invariably taken by loner-type characters. Or self-centered manipulators.
What gets me about this is that the people I've seen do this are generally some of the best roleplayers I know. People who don't suffer from 99% of usual gamer flaws and who usually contribute a lot to the enjoyment of a session. Since this is the case, and since actual roleplay is usually one of the most important facets of the games I participate in, it makes it hard to look askance at such practices. For a serious roleplayer like me, it can be tough to argue with good roleplaying.
But then I step back and think about what I said above, about how the enjoyment of the entire group is paramount. One thing that occurs to me is that, while "good roleplaying" does contribute to the overall enjoyment of the group, there comes a certain point when roleplaying a character accurately and well is more about the player's enjoyment than anything.
So what does one do about this? One thing these otherwise "good roleplayers" fail to see is that ultimately the player has control of the character. It's true, in both writing and in roleplaying, that some characters seem to come to life on their own. You don't have to think about what they say or do - it all comes perfectly naturally. And sometimes, that really is the height of roleplaying. But it's incredibly important to remember that the player really is the one in control. Sometimes, when a player thinks of exactly what the character would (or "should") do, that player needs to veto the character's decision and make one on their own.
If it's actually a good character, one with three dimensions and reasonable motivations and all that, then there is probably a way to justify not taking a given action. People are complex, contrary, flexible, and frequently indecisive. There are very few situations that exist in life, I think, that compel only one reaction. Barring those situations, those certain psychological triggers, cropping up in the game, there are almost always several options that are valid and "in character" for that character. There's almost always a good justification for taking an action that is conducive to group enjoyment, and, conversely, not taking an action that is inconducive to such.
And the more I think about it, the more I believe that this instinctual roleplaying, this need to always do what you first believe "the character would do," is just one step short of "good roleplaying." Or rather, of good game etiquette.
I'm not saying one should always take the path of least resistance in following the plot and getting along with the group, mind you. Character conflicts and independent actions are what add depth to the roleplaying in game sessions. I just wish more people knew when to reign in the character and do what's best for the game.