If you save (exit) a game standing on a slab and have anoter slab directly above you, upon entering the world you will be spawned in the same coordinates, but in a different height. Can be as high as the surface if there are no valid places in between.
Linked issues
Attachments
Comments 15

I just found something else, if there is no valid block to place you it will drop you from very high in the sky at world's spawn, regardless of where your bed is. This can be achieved by having lava be the highest block avaliable. Apparently the game will never spawn you in lava.