Once can see this is a very old light fixture in close contact with very old wood and is far too close to the closet shelf. A 100 watt light bulb gets VERY hot. A bare light bulb will get hot enough to cause a house fire.
Often people put things in the closet that start off being far from the light bulb. For one reason or another items in the closet like an old comforter placed on a high shelf can shift around falling on the light bulb while at the same time pushing the closet door open just enough to turn the light on. The above scenario can allow a house fire to occur in no time at all even if the light bulb was off because the door was closed at one time.
Old bare closet light bulbs are fire hazards, all must be removed and or replaced with safe lighting that meets modern rules for safety in order to cure existing fire and shock hazards.