Not all walls work this way. You could end up going round and round forever if you pick a wall which is the *outside* of an isolated interior polygon, such as a simple closed rectangle.
(When I was young, I used to solve, study and create mazes.)
But then it’s not a maze you could exit. Or enter.
Any maze that has an entry and exit must be navigable by following a continuous wall.