While playing morrowind i relised that all of the undead in the game have souls, but how can they have souls when they are animated bones?
Maybe they don't, and we're seeing game design issues. I assumed the living dead in TES don't have souls, similar to the way the CRPG version of Planescape:Torment showed them. In PS:T, the Dustmen zombie workers have been reanimated without their souls, which are in planes of reward or punishment; you recall their souls into their corpses in order to talk to them briefly.
I assumed TES undead are similar, but that's only my take on it.