The light is turned off when the fridge is not in use. It can be done by a spring loaded switch. The light goes off when the door is locked and the switch is pressed.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.