Minecraft wiki entry for Development_versions, associated text: Changed how respawn positions are chosen for beds and respawn anchors.
Respawn anchors now prioritize cardinal directions over corners.
Beds now prioritize the side of the bed the player entered from, and then spaces circling around the foot of the bed up to the head of the bed.
Respawning players now face the block they respawned at.
Placing players onto dangerous blocks is now avoided when possible.