Remeber castlevania? When the skeletons would throw their own bones at you? Why oh why canno they do it in DF? I modded my caccodemon to vomit bones at you... The dead have no preservation instinct... but then again maybe they lack the intellect to throw bones at you. How smart is the walking dead? Smart enough to walk at you, and detect you somehow. Smart enough to know their body can hurt you when accelerated to high speed. Why do they even want to hurt you?
Im not sure if you know nothing about undead, or are dead, or both. They obviously want to hurt you for your BRAINZZZ. This, however, does not explain why they go after Dwarves.
More testing is needed.
In the case of the Castlevania games, they were the undead thralls of Dracula, or who ever was the antagonist of that game, so they were hell bent on the stopping the protagonist(s). Same thing applies to the undead reserected by necromancers. The undead brought up by evil lands are more rage creatures, purely animalistic in nature, wanting to kill all life.