The primary reason would be corrosion of the door jamb switches. These are mounted halfway up the A pillar on the hinge end of the opening.
Depending upon your model, there may be an ambient light sensor in the dash. If the outside light is above a threshold the courtesy lamps will not illuminate via the door switches. This is controlled by the CCM (Central Control Module), later referred to as the BCM.
There is also a delay timer module original part no. 10098435 ) located in front of the passenger side I/P and taped to main wire harness. It is about a 2" cube. If this relay/timer has failed the lights may not operate with the door switches but will operate with the manual ON feature, since that switch simply grounds the lamp.