The reasons window units have a limited life span includes, compressor goes bad, the condensor coil mainly looses a lot of its ability to get rid of the heat due to fins corroding away, rusting out of the unit, people changing the older unit out for a newer unit that cost less to operate, thermostat goes bad, capacitor goes bad, installed central air and heat system. Some of the things I have said people do not want to spend the money to have repaired since a new unit is going to be cheaper to buy and to operate than having the old junker fixed.
There is no set time on how long anything including window unit will last. There are too many variables to figure in like --live near the saltwater, live in the low humidity SW states, damage to unit from children--lawn mower--tree limbs, how often unit is cleaned or not cleaned, how often filter is cleaned, how much willing to spend on repairs, where unit is stored in noncooling seasons or left in window, are just some of the variables.