I agree with most of the comments above... In other words, the example is a poor encounter for a DM to set up, but - if the PCs engineer the encounter through luck or guile - the DM shouldn't penalizing the PCs for turning a challenging encounter into an easy one. That's their job. And those two points are the right answers for a normal D&D game.
However, I also wanted to point out that, if you're in an atypical game where the PCs are concentrating on story goals as opposed to defeating as many monsters as possible, the xp system as written is not very helpful. If making peace with the orcs is just as legitimate an adventure path as exterminating them, you can effectively prevent your PCs from going down that path if it doesn't earn them any xp.
Whatever your game is like, you should focus your xp system on rewarding good play appropriate to that game. If the objective is to kill as many monsters as possible, then the DM should set up balanced monster encounters and the PCs should get rewards for killing them. (And, presumably, some quest xp for following the story.) But, if the overriding objective is the story, then you should be rewarding the PCs with story-based rewards. In a story-based rewards game, xp should be tied to really flexible quest goals and treasure / magic items should be about rewards for resolving the situation, not just stuff you loot off dead corpses.
-KS