Why Does the Wall-Follower Rule Work (and When Does It Loop)?
If every interior wall of a maze connects back to the outer boundary (a 'simply connected' maze), the maze walls form one continuous topological boundary. Tracing one wall continuously visits every reachable corridor and inevitably hits the exit.
If a maze contains free-standing island walls surrounding the center finish, a wall-follower can loop around the outer wall forever—in that case, Dead-End Filling or Trémaux's Algorithm guarantees the exit.