As I see it, the XP penalty from Raise Dead/Ressurection does not come from your god directly (i.e. your god doesn't smite you). Instead, it's the sacrifice parts of your own soul to bring back another. Like... if a huge amount of power had to be channeled somewhere, and if there are no presence of any soulstone, you have to channel that power through yourself, which puts your own soul into strain.
And why does the XP become worse the worse the relation between the deities are? Well...
Perhaps, if you are trying to ressurect a friendly deity, your own god will "help you a little bit more" compared to when you are ressurecting a unfriendly one!
