There's no doubt that the military needs to be loyal to the civilian leadership. And, more generally, they need to support everyone above them (military and civilian). From the article, it appears that McChrystal's staff held a very low opinion of the competence of their leadership and others involved in the war in Afghanistan (Holbrooke, etc). As Nords points out, it's not proper to tolerate open mockery of the other entities involved in the fight, and the fact that McChrystal didn't put a stop to it is the most damning thing I see in the article.
The more out-of-touch or inexperienced the higher-level leadership is, the more difficult it is for a guy in McChrystal's position to smile, back up those decisions, fulfill the objectives as though they were his own, and motivate those below him to do the same. That's why you need a very competent leader to pull it off. And, if the "big strategy" from on high is plainly not a good one, then the best tool a guy in McChrystal's position has is building a highly cohesive team. When done right, the guys on the staff take immense pride in the competence of their team. They trust McChrystal implicitly, and will work 20 hours/day so as not to disappoint him and to not let the team down. Ironically, the "harder" they are, the smarter they are, and the better they are, the more clearly they recognize shortcomings in the higher-level policies they are given to execute.
Examples: Publicly stating that the US will begin withdrawal from Afghanistan in 2012 probably briefs well in DC, and I'm sure it will take the pressure off a lot of politicians at a very convenient time. Guys on McChrystal's staff see plainly the devastating effects that setting a date has had on the the war--it has emboldened the Taliban and weakened the civilian government. Similarly, publicly criticizing Karzai might make sense to someone wanting to show he's "tough" and wanting to score some domestic political points, but it's incredibly damaging to the war effort, and will not produce a cleaner Afghan government or help them win the war--again, particularly if you've already told them that you'll soon be abandoning them. We have plenty of ways to influence the Karzai government, but a public tonguelashing from the US administration is the least likely to yield positive results given the factors at play here. BTW, the tactic is also unlikely to be effective in influencing British or Israeli governments. Some techniques one might learn on the campaign trail or which you might pick up in big-city politics do not translate well to the international arena--and if a President has surrounded himself with political experts rather than foreign policy experts, he might get some bad advice on foreign policy.
So, if you are working huge hours, deployed away from your family for an extended period, and seeing your buddies get killed to win the war despite higher-level steps that appear (to you) designed to do just the opposite--you might grow frustrated. You might tell a reporter that your boss and your staff are great, and the troops are great and doing their best, but you see some problems higher up. You might even mock the folks responsible for those policies. McChrystal should have stopped that--which is easier said than done.
The President should have called McChrytal in, discussed the corrosive effects of the grousing and the leaks, asked for McChrystal's honest assessment of places where the higher-level guidance was amiss,and asked McChrystal if he could support the present policies. After that, a decision to fire him or let him stay would be easy. Maybe they had exactly this conversation, and maybe McChrystal's answers are precisely the reason he's leaving.
I'd think the easiest job in the world right now is Public Affairs officer in Afghanistan. Just learn how to say "no" in every NATO language, Pashtu, and Urdu.
Comparisons to MacArthur are inappropriate. MacArthur openly defied Truman and intended to attack China against the orders of the President. That's so different from the allegations here (that McChrystal may have said things, or tolerated the saying of things, that hurt people's feelings) that no comparison is possible.