Since an archmage can have only 20 hit points and a barbarian 45, isn it unfair to base experience gained on the opponents hit points?
It is, in a sense, but it works in practice. Though the barbarian is worth 9 bonus points, it is not easy to ambush him in a group, capture him in a net, or win by dumb luck. Even a novice rogue could throw a net on the archmage in an ambush, hit him a few times while he’s struggling to get out, and defeat him before he has a chance to defend himself. Furthermore, because spellcasters have the potential to hit harder, faster, they end up being the first target in a group more often.