Henry V's anonymous walk among his men is a tremendously important part of the play. Henry hopes to hear that his men follow him faithfully and believe the invasion of France is just.
Williams, however, is obsinate in his questioning of the king's motivations and sense of moral responsibility. When stating that the king is responsible for the men who will die for his cause, Henry attempts to, but cannot effectively refute the argument. It is very much like a politician's response to a tricky question--he gives an answer that seems sound, but does not provide a specific rebuttal or explanation. Henry, however, is willing to carry the argument far enough to promise Williams that the two will settle their quarrel like men after the battle.
The exchange provides Henry an opportunity to discuss the difficulties and responsibilities of ruling ("Uneasy lies the head that wears the crown..."). We get insight into the king's true character and find that his motives for waging war stem from a sense of responsibility and justice. Without Williams's criticism these heavy moral questions would not be considered.
The scene makes Henry V a complex character, in touch with his humanity, who has to deal with the responsibilities of ruling. We empathize with him, but also recognize the criticism of leaders who choose war raised by Williams.