Each bulb have some sort of life time expectancy so if two lamps are installed at the same time and one fails after a long period of time you can deduce that the other can be close to failure as well so for security some people and manufacturers ($$$$) recommend replacing both at the same time.
The thing is that there is no rule since a lot of factors come to play when estimating the life expectancy of the bulb, just to mention a few.
Length of wiring (left and right side) some times indicator or other lights on the car have a different wire lengths.
Quality of the bulb two bulbs will never be the same even if the same quality check is applied to both, the filaments are sooooo delicate that what looks ok to the naked eye may be far from the reality.
Condition of the bulb receptor Bad contact, water, over heating, poor maintenance,etc, etc.
If one goes off buy two, replace one, and keep the other in the car just in case it is needed.