True, but who's going to do that, either in real life, or with their character, unless they're being incredibly pig-headed? So their characters are beheaded, and the cycle begins again...
I can imagine times when it is justified by the story line. King John is a virtuous but not particularly wise king, and the party knows that the knight in question is actually a traitor and if he accompanies the party the mission is likely to fail - but they don't yet have enough proof to make such a dangerous accusation. The party decides to tempt the king's temper rather than obey his unwise command, knowing that the king's bark is usually worse than his bite.
King John: I do not wish to destroy you, and yet you provoke me. Why must you boldly refuse my lawful command?
PCs: Because, my gracious and most merciful liege, our love for thee makes us bold. Those that swear greatest loyalty in public, oft times do thee injury and plot against you in secret and in their hearts. And those which refuse thee in public, oft times are not disloyal in their hearts and seek only to serve thee best.
DM: rolls a diplomacy check
King John (successful check): Oh very well. On account of your past deeds of errantry and your service to our crown, we will tolerate your impudence and be merciful for now. But see to it that your outward manners better reflect the inner humility you boast of or it will not go well with you in the future. Consider the poor example that you set for our less loved servants. You are not likely long to remain our favorites if these poor manners spread to the rest of my court.
King John (failed check): Words are as dross, but actions are as gold. Those servants that swear they love the King show their love best by their obedience. Either go accompanied by Sir Wolfsame or else go alone to the headsman, but either way get thee gone and tire us with your presence no further.