The toilets at my work do that, the light turns off if it detects no movement so I need to start waving my hands while I'm on the john and end up in the dark.
That "just" hides something that is so insanely hard to make work reliably in practice, any implementation of it is likely worse than a simple motion sensor... or a light switch.