I can try to help figure out what happened, but there are missing details you might need to supply.
Given only the information you’ve posted so far, I would guess you died while you were offline and your corpse decayed because it only lasts 30 minutes. However, I don’t know what killed you. As for why you respawned inside a dungeon, that might be a bug. I’ve heard of that happening occasionally.
To figure out what killed you, you should check what your event log says. Apart from that, it would help knowing what game mode you were playing (PVE, PVE-C, PVP), what kind of server (official or private), whether you use mods or not, and whether the whole server was offline or just you.