Gaining XP and progressing is viewed as a reward of learning, becoming better in what you do, with greater rewards stemming mainly (though certainly not solely) from achievements in combat, whether these involve backstabbing innocents, casting spells striking down your foes, wielding that broadsword with greater skill and so on and so forth. Thus, gaining a level as an assassin, sorcerer, fighter respectively, reflects your circumstances in using and improving the relevant skills.
What if a character comes in possession of an artifact of great power, that allows him or her to easily vanquish their opponents?
I am not talking about a level 1 character wielding say, a vorpal +8 greatsword that grants haste and improved invisibility because one could argue that it would simply improve their fighting skills. After all the sword would have to be wielded by them and they 'd be exposed to all sorts of dangers, while even a pesky goblin would have a chance taking them down.
What I am interested is the case of wielding essentially a "nuke" weapon. For example, a level 3 wizard gets his hands on an evil artifact that allows casting unlimited Weird. Gaining XP for exterminating a bunch of creatures (or say an entire city) is meaningful (and perhaps wholesome), but in what way does that make the wielder of said artifact a better spellcaster?
While the question is of interest to me regarding mainly Dungeons and Dragons and the 3.5e rules, I do believe it is of a more varied and general interest, so feel free to answer in a broader context if you desire.