there is only one thing i can think of
have you been to the nether in that world before
because when in the nether there is a chance of a portal generateing that leads back to the overworld
they are random and are designed to be in case you get stuck
my theroy is one generated and you dident notice
and when you went back to the overworld you found the exit portal