Good question, colleague. Why do they not give experience for breaking locks, for a successful hidden theft of something? Why don't they give you experience for solving some issue peacefully?
I imagine it like this. There is a group of warrior, barbarian and warlock, meets a group of goblins. Kill goblins, get 500 experience points. There is a group of a priest, a necromancer and a bard, sees the corpses of goblins. The necromancer raises the corpses, the priest blesses them, the bard inspires... As a result, the goblins are alive again. The second group gets 1500 experience points - they have done a much more difficult job.
If you are a warrior, then you gain experience for battles. If you are a thief, you get experience for opening locks and pickpocketing. If you are a druid, then you get experience when you drink birch sap. If you're a barbarian, then you just have the experience in advance, because you're scary. If you are a bard, then you get experience for attracting attention in the city square.