A.Master electrician Rex Cauldwell responds: Even though it doesn’t make sense, I’m afraid that this installation does meet the code. The NEC doesn’t require installations to follow common sense or be convenient. Certain dangers are permitted, as long as the danger is non-electrical.
The code doesn’t care that if the light goes off, you may be nude, walking in darkness on a wet, slippery floor, trying to find the door handle, or that you may have to walk (presumably, with a towel wrapped around you) through the party in the living room out to the garage to throw the GFCI breaker back on.
to read the full article.