Light didn’t go out with the ignition

Hello! Today something strange happened and I want to ask if someone knows what was going on. I parked back with the light switched on this evening and had the door open to see something in the snow. Still when the door was open I switched off the ignition, left the car and locked it. Then I noticed that the dipped light was still burning. I unlocked, switched off the light with the rotary button but it was still burning, switched on the ignition and it went off. What could have happened there? LG, Eric