When going through a nether portal, you spawn in the other dimension, 1-4 blocks away from the linked portal. Where you spawn seems consecutive for every portal. Some portals seem to spawn you in the right place, but most don't.
Related issues
Comments

Duplicate of MC-73504