Why does an electric light bulb nearly always burn out just as you turn on the light, almost never while the light is shining?
An electric light bulb is not an ideal resistor. This means that as the filament in the light bulb heats up, its resistance changes. When it is cool, the resistance is the lowest. This means that when the switch is flipped to turn it on, the current is larger initially and then decreases as the filament heats up and the resistance increases. The sudden change in temperature due to the current can cause the brittle filament to break. Once the bulb is shining, the temperature is staying relatively constant and the filament is unlikely to break.
The effect is much worse if your bulb is being dimmed by a cheap dimmer switch, because even though the filament is getting less power, it's getting it in a very choppy form that often causes the filament to oscillate and buzz. Better dimmers have a choke and some capacitors to help smooth out the choppy signal coming from the triac.