Jeff Spross offers the best defense of Game of Thrones' Ned Stark that I've seen, arguing that his adherence to principle is based not on stupidity, but on the recognition that treachery offers no more guarantee of success:
Honor begins with the understanding of all this. Ned's moral lines emerge out of ideology and principle, but also out of the recognition — perhaps explicit, certainly instinctive — that crossing those lines guarantees him nothing. He is neither a sentimentalist nor a narrow moralistic thinker, both of which imply a failure to recognize the character of one's fellow humans or the nature of one's circumstances. Ned fully recognizes the nest of vipers in which he finds himself, but is unwilling to sacrifice his ethics in order to just spin his strategic wheels.
Even if a man decides that gaining the world is worth the price of his soul, that does not mean the transaction will go through. And even in the pinnacle of worldly success, disease, chance, old age, and death still await — for him and his loved ones. As for the social level, every institution that is built and defended comes tumbling down, sooner or later. Thanks to enlightenment, we modern Westerners tend to place a high premium on managing the systems of the world for social betterment. Which is a noble thing itself, but it must be tempered by a kind of metaphysical humility. And Ned's particularly poignant embodiment of that humility is what I suspect drives a lot of the show's viewers to frustration. But winter is coming, as Ned well knew.
I think at least part of people's hostility toward Ned is rooted in our feelings for the character himself--we're conditioned into seeing our heroes prevail, and lashing out at Ned is a way to separate ourselves from the trauma of watching him fail. It's easy to take the wrong lesson from Stark's demise--that had he been just a little more like Cersei Lannister, he might have prevailed. But as Spross writes, there's certainly no guarantee of that, and simply seeing Ned as dumb or foolish misses the larger point Martin is communicating about the dumb, arbitrary cruelty of the feudal system and the moral failure of fantasy literature in romanticizing it.