It's just an in-game mechanic, that has 0 effect on the story.
If death wasn't permanent at all then the story would become boring and pointless ... would death be permanent every time a player mistakes the height of the jump he takes the game would be impossible to play.
The only lore connection it did have was that Spirit Healers were Val'kyr that split off to bring noble souls back because their destiny wasn't completed yet... But this has been retconned two times already and is no longer relevant.
There are a few exceptions where it is tied to the lore but rather irrelevant like in The Scarlet Enclave you play a death Knight, an undead servant of the Lich king. He doesn't allow you to die so he sends his Val'Kyr to bring you back as his slave over and over until your task is complete.