So apparently, unbeknownst to me, real adult human beings play D&D in such a manner where if something grants experience, they're going to try to kill it. Nevermind that it's just a local knight or baron, that the source of xp is the kindly wizard living in the wild, or just a simple bear minding its own business. Since the game says there is a reward for killing it, we should kill it. I have only rarely encountered this attitude before and I beat it out of people right quick, not with verbal lessons, but with object ones about the danger of combat and the results of randomly murdering people wherever you go. Apparently, there are people (like —C of Hack 'n Slash) who think that these sort of in-milieux consequences don't go far enough to discourage wanton murder because the mechanics are secretly whispering for you to do something else. Here are my contentions against this viewpoint.
I. What XP Describes. It's important to understand what experience is meant to model in D&D. It's certainly not just a "reward," as nebulous as that is in a game where you can't really win. XP, as it says on the tin, is experience. Primarily, it is the experience of having been in battle and understanding how your weapons could be put to better use, the honing of your muscles and intuition, the sharpening of your reaction speed, even the deeper understanding of the spells you know by repeated use.
II. What is the logic for getting XP from combat? It follows from (I) that the logic is simply this: as you fight more things, you get more experienced at fighting things. Seems to make sense to me and I'm not sure how this could become a point of contention.
III. What is the logic for getting XP from conversation, or class-specific rewards? This should really be broken into two sections, since conversation and roleplay are not the same as the rewards. Thus, let us say (Ai) Conversation and roleplay provides experience simply on the scale of a benny or a bump to encourage you to do it in the future. But (Aii) it also models the process by which characters experience other worldviews and new facets of the world. While this might not be extremely useful for combat, there's no reason why it wouldn't increase your overall competency. So we have a (Ai) reward-based logic and an (Aii) advancement logic here. I think they work well together.
Class-specific awards are given out because not all classes focus on the same thing. They have new and different ability suites, other than just "murder." This is why the class-specific awards given to warriors are all for killing, but wizards get awards for any useful spellcasting. The logic goes both ways as above: (Bi) This causes you to behave in a manner commensurate with your class. Eg, fighters will see fighting as the most viable option, while priests will attempt to follow the dictates of their gods instead (whether those are to fight or not, etc.) We also have a (Bii) advancement logic; fighters skills are mostly geared towards fighting, so they will get the most xp from doing this. However, thieves, for example, have a vast array of non-fighting skills, which should be increased by using them rather than by fighting. Thus, this logic spreads out the advancement based on what the class would actually need to do to become more proficient at its essential characteristics.
IV. What happens if you kill everything? There are a number of answers to this, so once again we will divide them into categories. The first answer is that (A) Combat is dangerous. The second is that (B) people in the setting will behave differently if the PCs are known to be murderers and possibly insane. The third is that (C) the characters in world have no reason to act that way. Now, I openly recognize that (C) is the weakest of the points. I think it's been discussed to death at this juncture, so let us explore points (A) and (B).
(A) Combat is dangerous. I don't run easy combats. Every time the PCs get into a fight, no matter what level their opponent is, no matter what it is, there is a chance that someone will die. This means they limit fighting to that which is absolutely necessary. I like this. Their bowels turn to water when swords are drawn. This has the effect of limiting the number of combat encounters to those which are unavoidable. Of course, unavoidable here doesn't mean that they will only fight when the foe offers battle, but rather when it is necessary to complete a certain goal. It would be hard to kill the archwizard Bazil if they never got into any kind of altercation with him.
(B) People will treat you differently. Murderers, particularly those with reputations for murder, can expect to find themselves hunted down by other adventuring parties. Someday, the parties coming after them will be strong enough or lucky enough to kill them. That's the facts jack. Further, parties with bad reputations are likely to be denied entry to towns and cities, to be harried by the faithful of those they've wronged, to be cursed by the gods, etc.
V. The game is not just a collection of rules. It must also encompass a setting/milieux. The rules and the milieux interact together. This is what makes an RPG different from a board game. Sure, it has that G for Game in there, but it also has that RP for Role Playing. If you need a hard rule to discourage you from playing a psychopath that kills everyone who speaks to him, you probably don't really want to be playing a PnP RPG, which is about maximizing choice freedom, the essential quality whereby it differs from any other kind of game.