It's quite simple. Martin takes what normal people do, then does the opposite. If there's a heroic situation or character, he's going to subvert it. Basically you just have to understand his mindset. To be fair, I spend a lot of time writing, so I may just be aware the tools of the trade.
[spoiler/] For the most part it's common sense. Let's look at two of the most "shocking" moments in the series.
When Eddard was taken captive, there was little chance of him surviving. His province was in open rebellion, he was surrounded by enemies, and he had already revealed that he knew everything to Cersei. Martin uses narrative misdirection by saying that he can be sent up north to the wall if his son stands down. Unfortunately this is incredibly stupid. First of all, it's out of Cerseis character to spare someone who may be a threat, or knows about her incest. She's paranoid and ruthless, so her offering to spare Eddard makes zero sense in that context. It was a betrayal of character for her to do that. Clearly Martin was just trying to find a way to misdirect his audience so he could pull the rug out from under them. Second, for Eddard to go to the wall, he would have to be sent past HIS OWN LANDS, which are currently in open rebellion. That's not even an option. Reading the books, I said that if he didn't kill of Eddard, then I would quit reading them then and there. It wasn't just an option at that point, it was the only option. Martin could have just said he would remain in house arrest in Kings Landing, but he clearly wanted to give some hope to the audience before killing Eddard, even if it didn't make any sense. The only reason people were surprised by his death was because he was the closest thing to a main character. Given logic, though, there was no other way for this to turn out. Martin really asks that you don't think about it too much.
The second is the Red Wedding. Rob Stark knowingly cheated the Freys, who are infamously proud. At this point his capital is burned, his family is dead or missing, he's facing possible invasion from the North, the South, and the West, all by armies larger than his own, his lieutenants are losing battles left and right, he's lost his most important bargaining chip, Jaime, his vassals, such as the karstarks, are deserting him, and he's separated from the Northern parts of his own land. Militarily, the war is already over. Once he meets the Frays, the outcome was clear. Frey uses blatantly suspicious terms like "the streets will run red with wine." Red Wine. Get it? Cause blood. Clever Martin (rolls eyes). The characters then make a plan to invade the Iron Islands, which is another glaring case of narrative misdirection. Now that Martin has his setup, it's time to pull the rug. The army is separated from their leader, which is suspicious enough, and then they are given alcohol. There is also mention that the band was too loud, a clear sign that they were trying to mask the sound of battle. Everyone then dies. The problem is that, if you look at the characters, and the situation, there's no real alternative. Why would the Frays support the losing side in a war when that side has already wronged them? Even without the Red Wedding, you would have to really stretch things to have a realistic happy ending for the characters at this point. What I don't understand is that Martin keeps doing the same thing over and over, and yet people keep getting surprised. Eddard dies in book one. Winterfell burns in book two. The Red Wedding occurs in book three, as well as the death of the viper. Martin sets up an event, deploys narrative misdirection, and then pulls the rug. Over and over.
If I sound irritated, then it's because of the reasoning given for these events. All of Martins fans talk about how Eddard, Rob, The Viper, and many other characters died because they were "too honorable." As if being a good person, in and of itself, got these people killed. I haven't seen reasoning this atrocious since Atlus Shrugged. They didn't die because they were good, they died because they were INCREDIBLY stupid. Eddard told his sworn enemy everything he knew while his allies were away, then gave them time to plot, and placed his trust in clearly selfish individuals. Rob betrayed a sworn oath to his most importent ally, punished his most loyal allies, and then put himself and his army in the most compromised position possible. The Viper exposed himself to his enemy after having all but won. As I read it, I mentally said "keep your distance, moron, he's about to grab you ankle." *Screaming starts.* Honor and intelligence aren't mutually exclusive. You can be both. I find Martins world view disturbing, nihilistic, and most impotently, intellectually bankrupt. [/spoiler]
I do love that this fight was basically The Princess Bride, though. "I am The Viper. You killed my sister. Now prepare to die!