This depends a lot on what you consider a maze. If you start in the small room of this
<
you never make it out with either the left or right hand.
It will work both entrance and exit are on the outside of the maze, and there are no bridges or tunnels or other weirdness. To see why the method works, think about the wall your hand is on as having a long path around it. That path must be a loop, and we know that the part of the path on the outside of the maze goes from the exit to the entrance. Therefore, the part on the inside must go from the entrance to the exit, to complete the loop.