That's only if you shut your kid in a dark room. *shudder* My parents left the hall light on with my/my brother's doors open; since we weren't trapped in the dark, we felt safe enough to relax in bed. After they went to bed several hours later, they usually turned the hall light off and put a strong night-light on in the hall bathroom to add to the ones we had in our bedrooms. As pre-teens, we each lost our fear of the dark, gained an interest in privacy (or reading under the covers)and thus began closing our doors on our own.
FWIW,I did/do have a serious sleep disorder from a brain abnormality -- I naturally "sleep" at a light doze for 4-5 hours, and wake up whenever my body wants to move. As a kid, being able to see the light helped me feel safe enough to relax in bed with my eyes closed when awake; I eventually also was given a clock-radio tuned to a local classical station I could listen to softly, then was taught to enjoy the time by imagining a dream. As an adult, I take medication (gabapentin), though I know parents of kids with the same condition that swear by giving the child a melatonin supplement before bed.