The context of that rule is key. It's a limitation on the previous paragraph, which is titled "Moving Around Other Creatures" and says you can move through the space occupied by another creature, if that creature isn't hostile. (Or if it's much larger or smaller than you, but I'll ignore that for now.)
Further context comes from this very important paragraph further down:
A creature's space is the area in feet that it effectively controls in combat, not an expression of its physical dimensions. A typical Medium creature isn't 5 feet wide, for example, but it does control a space that wide. If a Medium hobgoblin stands in a 5‐foot-wide doorway, other creatures can't get through unless the hobgoblin lets them.
So, the existence of a creature's space (which you are excluded from ending your turn in) is tied to its control of the space. Its space is the area that can choose to let you through or not.*
If Bob and Carol (both Medium humanoids) are in a 5-foot wide hallway and Carol wants to move past Bob, that's physically possible. Bob doesn't block the whole hallway. But he controls the hallway, so he can block Carol if he wants to.* Or he can let her enter his space, but when she stops moving, she has to have her own controlled space that's not on top of his.
(Yes, you can cram Bob and Carol and several of their friends into an elevator in such a way that nobody will get to control a whole 5-foot-wide** space. The abstraction can only be pushed so far.)
The rules don't generally consider a dead creature to be a creature, so it controls no space. It's an inert obstacle. If Carol wants to step over a dead body, she can do that (though it may be difficult terrain). If it's a dead frost giant or dragon or something, she might have to climb on top of it. But she isn't excluded from its space.
Now, what if it's unconscious? Here's a sanity check: If you don't know if a creature is unconscious or dead, and you want to find out, can you try to step into its space and see if the DM lets you do it? Is this a viable way to determine if the creature is dead?
No. No, it is not. An unconscious creature doesn't do anything to block anyone from entering its space; therefore they can enter. And it doesn't control any space, so you can control space right on top of it.
*It's kind of unfortunate that they say "a nonhostile creature" instead of "a creature that permits you to pass", because there are cases where a hostile creature might well permit you to pass. For example, if it's invisible.
**Note that the shape of your "space" is not defined, only the width. The paragraph I cited contains the mathematically absurd phrase "area in feet", and that's the level of precision we're dealing with here.