Although O2 sensors are supposed to last 100k miles (160,000km), some die earlier.
Contaminated gas, excessive idling, rich A/F operation, flooding, oil consumption, some fuel additives, and especially ethylene glycol antifreeze contamination will contribute to the early failure of O2 sensors.
Just be glad you don't have a five year old electric car that needs an $8000 set of batteries.